interesting find but why?
-
i have a background image on my form and i wanted to put a transparent label on it. however, i noticed that a label cannot have it's backcolor changed to 'transparent'. so i created a groupbox and placed a label in it. i then changed to backcolor of the groupbox to 'transparent' and the label's backcolor is now transparent! what the heck? is this a 'feature' of the groupbox or is there some other way of making a label transparent that i don't know about? Rob -- There are 10 kinds of people. Those who understand binary and those who don't.
-
i have a background image on my form and i wanted to put a transparent label on it. however, i noticed that a label cannot have it's backcolor changed to 'transparent'. so i created a groupbox and placed a label in it. i then changed to backcolor of the groupbox to 'transparent' and the label's backcolor is now transparent! what the heck? is this a 'feature' of the groupbox or is there some other way of making a label transparent that i don't know about? Rob -- There are 10 kinds of people. Those who understand binary and those who don't.
*UPDATE* i believe i've come across a bug. try these steps: create a groupbox on a form and set the backcolor to 'transparent'.....works great now change the backcolor back to 'control', change the flatstyle to 'system', then try to set the backcolor to 'transparent'.....error 'Invalid property value.' okay, so it won't let you have a transparent background while the flatstyle is set to system. so change the flatstyle back to 'normal' and change the backcolor to 'transparent'. then change the flatstyle to 'system'.....works!? but it's really buggy, the display in the groupbox fails to update and when the program is run the background of the groupbox is weirded out. i'm NOT using csharp 2003 so i don't know if they've fixed this in the new version or not. did they? why can the backcolor not be transparent if the flatstyle is set to 'system'? Rob Tomson -- There are 10 kinds of people. Those who understand binary and those who don't.
-
*UPDATE* i believe i've come across a bug. try these steps: create a groupbox on a form and set the backcolor to 'transparent'.....works great now change the backcolor back to 'control', change the flatstyle to 'system', then try to set the backcolor to 'transparent'.....error 'Invalid property value.' okay, so it won't let you have a transparent background while the flatstyle is set to system. so change the flatstyle back to 'normal' and change the backcolor to 'transparent'. then change the flatstyle to 'system'.....works!? but it's really buggy, the display in the groupbox fails to update and when the program is run the background of the groupbox is weirded out. i'm NOT using csharp 2003 so i don't know if they've fixed this in the new version or not. did they? why can the backcolor not be transparent if the flatstyle is set to 'system'? Rob Tomson -- There are 10 kinds of people. Those who understand binary and those who don't.
Rob Tomson wrote: why can the backcolor not be transparent if the flatstyle is set to 'system'? When you set the FlatStyle property to System you are telling the Framework to always let the OS do the drawing for that control. To my knowledge either none or not all of the .NET enabled OSes support the Transparent style which would require the Framework to emulate your choice but that goes against telling the framework to let the OS draw the control. James "My words but a whisper -- your deafness a SHOUT. I may make you feel but I can't make you think." - Thick as a Brick, Jethro Tull 1972
-
i have a background image on my form and i wanted to put a transparent label on it. however, i noticed that a label cannot have it's backcolor changed to 'transparent'. so i created a groupbox and placed a label in it. i then changed to backcolor of the groupbox to 'transparent' and the label's backcolor is now transparent! what the heck? is this a 'feature' of the groupbox or is there some other way of making a label transparent that i don't know about? Rob -- There are 10 kinds of people. Those who understand binary and those who don't.
even if you do a SetStyle method in the constructor. It works for most controls so since a label is a derivative of the control class you would thinks so. SetStyle must be done in the constructor only by the way I'm not an expert yet, but I play one at work. Yeah and here too.