Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Label Properties (Mouse Move)

Status
Not open for further replies.

Hayton

Technical User
Oct 17, 2001
257
NZ
Hi Everyone, using the mouse move event I can cause the labels text to go bold when the mouse moves over the label. Whats the code to make revert back to normal text when the mouse moves off the label.

The code I have used is:
Private Sub lblGrpPur_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.lblGrpPur.FontBold = True
End Sub

Thanks
McGregor
 
Apologies MouseDown should be MouseMove!!!
 
Haydon, can you tell me how you solved this please?
I am trying to do the same thing and using detail.on_mouse_move
 
Hi mittalk glad too help!

The simple solution for you is:-

Set your label property for FontWeight to Normal
In the mouse move event a placed the following code:

Me.lblYourLabelName.FontBold = True

For the next label I placed the following code:
Me.lblOtherLabelName.FontBold = True
Me.lblYourLabelName.FontBold = False

When the mouse moves over the label the font will be bold (Property - true)and when you move it over the next label or control the label will revert back to Normal (Property - False.

There are other ways of doing this in code. If you look at some of Microsoft sample databases, they have a pretty good method for doing this as well!


I trust this will be of help.
Regards
Hayton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top