A reliable & effiecent way to change labels back to original state

M

Michael

Hi there,

Straight-up thanks for taking the time, if I can help in the future I'd be
delighted...

Here's what I do...
I love using labels that do something on-click.
I change effects, fonds and background colour either on-mouse move,
on-mouse down and on-click.

Here's my issue...
I am using a number of different methods to change labels back to their
original state. All seem to do the trick but I've somehow got the feeling I
am not doing it properly.

1) I either loop through a collection of controls on a page or form and do
it this way, or
2) if there only a few labels I dump code like obj.SpecialEffect = 0 into
the form's Details on-mouse move and into the header just to make sure!
3) I am also using a function that resets all and the caller is set

Bottom line, is there a better and effecient way of doing this?

Thanks for any feedback and have a wonderfull day
 
M

mscertified

Any way that works is good enough. However, I'd caution against using
non-standard user-interface features. There is a good reason that all
applications should use the same user-interface elements - so users dont have
to retrain for each application.

-Dorian
 
M

Marshall Barton

Michael said:
Straight-up thanks for taking the time, if I can help in the future I'd be
delighted...

Here's what I do...
I love using labels that do something on-click.
I change effects, fonds and background colour either on-mouse move,
on-mouse down and on-click.

Here's my issue...
I am using a number of different methods to change labels back to their
original state. All seem to do the trick but I've somehow got the feeling I
am not doing it properly.

1) I either loop through a collection of controls on a page or form and do
it this way, or
2) if there only a few labels I dump code like obj.SpecialEffect = 0 into
the form's Details on-mouse move and into the header just to make sure!
3) I am also using a function that resets all and the caller is set

Bottom line, is there a better and effecient way of doing this?


If only one control is in a changed state at a time, I like
to set a module level variable to that control's object.
Then the Detail's code only needs to reset that one control
without worrying about other controls. OTOH, if you have
control's that are fairly close to each other so that a high
speed mouse movement might not trigger the detail's mouse
events, it's a good idea to check the variable and reset it
before setting the new mouse position's control.
 
Top