GrahamUK33 Registered User. Local time Today, 06:34 Joined May 19, 2011 Messages 58 Jun 25, 2018 #1 Is it possible to change the colour of the text on a label on hoover, and then change colour back when mouse has moved away, or label has lost focus?
Is it possible to change the colour of the text on a label on hoover, and then change colour back when mouse has moved away, or label has lost focus?
arnelgp ..forever waiting... waiting for jellybean! Local time Today, 13:34 Joined May 7, 2009 Messages 20,276 Jun 25, 2018 #2 Use the labels OnMouseMove event to cng color. form's Section(formheader or detail, etc) mousemove event to reinstate the color.
Use the labels OnMouseMove event to cng color. form's Section(formheader or detail, etc) mousemove event to reinstate the color.
GrahamUK33 Registered User. Local time Today, 06:34 Joined May 19, 2011 Messages 58 Jun 25, 2018 #3 arnelgp said: Use the labels OnMouseMove event to cng color. form's Section(formheader or detail, etc) mousemove event to reinstate the color. Click to expand... I tried that, the colour flickers/flashes when the mouse moved around. The code below does the same, but without the flickering/flashing: MouseMove on label If Not Me.lblLabel1.ForeColor = RGB(68, 84, 106) Then Me.lblLabel1.ForeColor = RGB(68, 84, 106) MouseMove on form If Not Me.lblLabel1.ForeColor = RGB(127, 127, 127) Then Me.lblLabel1.ForeColor = RGB(127, 127, 127)
arnelgp said: Use the labels OnMouseMove event to cng color. form's Section(formheader or detail, etc) mousemove event to reinstate the color. Click to expand... I tried that, the colour flickers/flashes when the mouse moved around. The code below does the same, but without the flickering/flashing: MouseMove on label If Not Me.lblLabel1.ForeColor = RGB(68, 84, 106) Then Me.lblLabel1.ForeColor = RGB(68, 84, 106) MouseMove on form If Not Me.lblLabel1.ForeColor = RGB(127, 127, 127) Then Me.lblLabel1.ForeColor = RGB(127, 127, 127)
arnelgp ..forever waiting... waiting for jellybean! Local time Today, 13:34 Joined May 7, 2009 Messages 20,276 Jun 25, 2018 #4 Yes ofcourse you only need to chg the color once.