Change control button on focus (1 Viewer)

aliasquark

Registered User.
Local time
Today, 10:36
Joined
Dec 2, 2002
Messages
14
Situation...

Users press tab (or up/down) to move around control elements in a form.

When they get to the control button which they require they press enter to run that command.

PROBLEM: It is hard to see which control button is in focus

QUESTION: Is it possible for the control button to change from it's default colour to another colour when that perticular control is in focus.

Q.
 

shay

Registered User.
Local time
Today, 10:36
Joined
Apr 29, 2002
Messages
169
Hi there

I have seen an example of buttons changing colour but can't remember where. How about this idea: why not change the colour of the text on the button with focus?

You could create two new procedures

Sub HasGotFocus()
Screen.ActiveControl.ForeColor = 255
End Sub

Sub HasLostFocus()
Screen.ActiveControl.ForeColor = 0
End Sub

Then call HasGotFocus from each command button GotFocus event and call HasLostFocus from each LostFocus event.

hth

shay :cool:
 

aliasquark

Registered User.
Local time
Today, 10:36
Joined
Dec 2, 2002
Messages
14
Thankyou.... that will be just fine

Q
 

Users who are viewing this thread

Top Bottom