Cyotek Forums

Source Code => Source Code => Topic started by: abenchaaben on February 01, 2018, 08:29:49 AM

Title: Control transparency on ImageBox
Post by: abenchaaben on February 01, 2018, 08:29:49 AM
Hi,

I'm new on using ImageBox and i found it very helpful, so thank's. I'm developping a image viewer with annotation feature and more. I want to put on the ImageBox button and check box to activate some feature (display or not an image from mutliTiff image for example). I put my buttons on transparency mode, but it seem not working when i load an image. The button does not have the background of the currently loaded image.

Thank you for your help and sorry about my english.
Title: Re: Control transparency on ImageBox
Post by: Richard Moss on February 04, 2018, 10:28:08 AM
Hello,

Welcome to the forums!

The ImageBox control isn't designed to be a control container, so if you drop another control onto it, it will get added to the parent container instead. You could then modify the designer file to reparent it, but when I tested this as soon as I tried to move the child control, it was parented back to the non-ImageBox container.

However, I did note that when the control (a CheckBox with BackColor set to Color.Transparent) then it worked correctly.

So while technically it appears to be possibly, it would be difficult to do this purely via a visual designer.

Regards;
Richard Moss