Click to See Complete Forum and Search --> : Label Visibility


Mongoose
February 18th, 2000, 08:29 AM
Does anyone know why A Label will not actually bring all the way to the Front when it's placed over a Grid? I'm using the TrueDBGrid and I have a simple Label that sometimes will overlap the grid. I want to make sure that label will be in front of the grid no matter what. And like i said when i use the Bring To Front command option it does not go over the grid.

I just thought It was weird because you can use a textbox and bring it to the front and It will in fact go over the grid. but not just a label??

if anyone has any information on the subject please let me know :)

thankx

Chris Eastwood
February 18th, 2000, 08:37 AM
Infuriating isn't it ?

The reason is that the 'Label' control isn't actually a 'window' (like all normal controls). The Label is drawn onto the form / container at runtime and has the properties applied to it that you chose at design time. Windows then passes the paint message onto the other controls that simply draw over the label.

The only way around this is to create your own 'Label' control in VB using either a PictureBox (containing a label - the lazy way), or by creating a new Usercontrol project for your new label.


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb