Changing color or font of current label

aqif

Registered User.
Local time
Today, 12:47
Joined
Jul 9, 2001
Messages
158
Hi
smile.gif


Just want to find out that is there any way to change the color of current label in focus to make the current control more visible. I have build a form which mostly contains check boxes and options buttons, so it becomes hard for the user to see where the cursor is at the moment. Any suggenstions?

Cheers!
Aqif
 
I would suggest to revert the colour of the label so they font colour becomes the back colour and the back colour becomes the font colour....

Just insert into the code something like:

Private Sub CONTROLNAME_GotFocus()
Me![LABELNAME].ForeColor = 8388608
Me![LABELNAME].BackColor = 16777215
End Sub

into the GotFocus event.

When leaving the control you want the label to revert so add this into the LostFocus:

Private Sub CONTROLNAME_LostFocus()
Me![LABELNAME].ForeColor = 16777215
Me![LABELNAME].BackColor = 8388608
End Sub


The numbers are the colours...

[This message has been edited by Laocon (edited 09-14-2001).]
 
Hi.
here's another option that I use, quite well.

On the 'Back Style' property of a field choose 'transparent'.
When the the focus is not on a field, you see the label but the data entry part is clear-looking. When it has the focus, the data entry part has the color you originally wanted for the field.
Works great esp. if you have built logic that automatically skips some fields, so that users can easily see where they now are.

Hope this helps you.

Russ
 
Dear Russ
smile.gif


Thanxx for ur advice....my main problem is highlighting the labels in any way since i have very few taxt boxes but many check boxes n option buttons on my form which is making difficult to see where ur cursor is rite now. The only solution i could think of is to chnage the active label color to diff color. With respect to 1st suggestion...then i had to enter the label names of all controls ...is there any way i could pick up the active label name automaticaly?

Cheers!
Aqif
 
Aqif,

you would enter that code into the appropriate events of all controls.... so each one would activate for itself....

As for all controls using the same code - that I don't know...
 

Users who are viewing this thread

Back
Top Bottom