highlight the cursor position

G

Gator

is there a way to highlight the position of the cursor....for example if the
cursor is in a textbox, the textbox background would change to a certain
color. Now, if there are, say, 30 controls on the form, is there a way in
program to highlight where the cursor is. If the button has the focus it is
blue, if the textbox has focus it is blue or if the subform has focus it is
blue... I don't think I want to code each control for focus.....is there
some code to use that will check where the focus is and change the property,
like the background color?
 
M

Maurice

What I always use is the conditional formatting for this option. Select all
the controls and choose conditional formatting. In the condition choose for
"when field has focus". Choose an appropropriate background color (Yellow is
a good choice) and voila.

Test is out by tabbing thtough the different controls and you'll see that
the field that has focus will change the backgrounf color of the field.

A well appreciated feature by the end-users.

hth
 
M

Marshall Barton

Gator said:
is there a way to highlight the position of the cursor....for example if the
cursor is in a textbox, the textbox background would change to a certain
color. Now, if there are, say, 30 controls on the form, is there a way in
program to highlight where the cursor is. If the button has the focus it is
blue, if the textbox has focus it is blue or if the subform has focus it is
blue... I don't think I want to code each control for focus.....is there
some code to use that will check where the focus is and change the property,
like the background color?


For Text and Combo boxes, you can just use Conditional
Formatting (Format menu) with the Has Focus option.

Other controls, (e.g. buttons) not only have no formatting,
but you can not change their back color. What I've done for
these controls is put a label control behind the button (so
it shows around the edges and use the button's GotFocus
event to change the label's back color and LostFocus to
change it back.

Setting a subform's color (actually each of its sections)
too doesn't make a lot of sense because you would not be
able to highlight the control in the subform (unless you use
another color and make your form's look like Christmas
trees).
 
G

Gator

it works now. I don't know what I was doing to cause that message. I might
have unknowingly selected a control that did not allow that format...thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top