Control with transparent background

wakeup

Freshman
Joined
Nov 9, 2004
Messages
35
Is posible in Visual Studio .Net 2005 set transparent background to a control?

I want avoid, It covers the line in back. See example.

raro.JPG


Thanks

_________________
Hip Hop Directo
De Chiste
 
I believe the simplest answer to that question is probably no, Visual Studio does not support setting a controls background to transparent. Setting a controls background colour to transparent essential copies the background colour of its parent object rather than actually making its background transparent.

In that particular instance I can suggest a really nasty work around. Add a label to the group control with a height of 2, and its border property set to 3d. then position it at the bottom of the group control and it will appear to complete the loop.

Somebody else may have a better solution, but you might have to wait awhile for another reply.
 
I have tried to do it, but the 3d border of the label control, isn't the same as the border of group control :(
 
I have to say that that wouldn't be a very reliable solution. It depends on the user using the classing windows theme. I think you need to either resize the track bar or its container. The unfortunate fact is that the track bar stinks at fitting the handle and the tick marks within its window properly.
 
The trackbar has a minimum height that doesn't listen to the minimumSize property - you can't resize height. You could make your own trackbar.
The other way is to have some of the trackbar lying outside the groupbox. But the groupbox 3D boundary is drawn inside its bounds, so the trackbar obscures it...
So...

add a panel to a groupbox,
resize it so it just fits, and set it to anchor left, right, top, bottom
then add the trackbar to the panel...

The panel will clip the trackbar, so the groupbox won't be obscured.
 
Last edited:
Back
Top