-
Transparent TextBox
Hi All,
I need to have transparent textboxes. I thought it would be as simple as inheriting TextBox and putting the following code in the constructor:-
setstyle(ControlStyles.SupportsTransparentBackColor, True)
The textbox now certainly allows me to set the backcolor to transparent, but unfortunately it always displays as white when I do.
Any clues?
Alan Liddle
-
as far as I know, you cant have a transparent control
-
Yes you can
I have alread created a transparent label and a few other usercontrols. Documentation suggests that by simply inheriting and setting the Style correctly it will work. If I don't set the SetStyle and try to set the background color to transparent it generates an error. The the style set it doesn't.
Alan :confused:
-
Umm I mean can you see what's under the control?
if you put your transparent textbox on top of a command button, can you see the command button under the textbox?
-
Yep! At least that is what happens with our label and other controls. But we designed them from the ground up (Inherited from UserControl). The textbox control I have has been inherited from TextBox.