Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default OptionButton visual cueing

I'm being pernickety but€¦€¦..

On a form say there are 3 optbtns amongst textboxes and comboboxes.
To enhance the marquee cue when an optbtn has focus I change its forecolour
using:
Private Sub optbtn1_Enter()
optbtn1.ForeColor = vbRed
End Sub

and on exit:
Private Sub optbtn1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
optbtn1.ForeColor = vbBlue
End Sub
etc etc

This is fine when tabbing around the form and then selecting a control using
the spacebar.
However there is a little niggle when it comes to selecting a control which
does not have focus for example:
Say optbtn3 has focus (red) and the user wishes to select optbtn1 with the
mouse. On MouseDown, optbtn1's Enter event is fired and its colour changes
to red until MouseUp, code is executed and focus is moved elsewhere.
This momentary flash of 'highlighting' colour is a bit distracting. Are
there other events I could use to achieve the same visual cueing yet avoid
the flash?

T.I.A.

Geoff

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default OptionButton visual cueing

Hi Geoff,

Not sure I follow. If (?) you mean when user selects the option button with
mouse you DON'T want forecolor to change from blue to red, because code in
the mouseup event will go on to select another control, perhaps reset colour
to vbBlue in the Mousedown event. The mousedown event would file so soon
after the Enter event the colour change would not be noticeable.

Regards,
Peter T

"Geoff" wrote in message
...
I'm being pernickety but....

On a form say there are 3 optbtns amongst textboxes and comboboxes.
To enhance the marquee cue when an optbtn has focus I change its

forecolour
using:
Private Sub optbtn1_Enter()
optbtn1.ForeColor = vbRed
End Sub

and on exit:
Private Sub optbtn1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
optbtn1.ForeColor = vbBlue
End Sub
etc etc

This is fine when tabbing around the form and then selecting a control

using
the spacebar.
However there is a little niggle when it comes to selecting a control

which
does not have focus for example:
Say optbtn3 has focus (red) and the user wishes to select optbtn1 with the
mouse. On MouseDown, optbtn1's Enter event is fired and its colour

changes
to red until MouseUp, code is executed and focus is moved elsewhere.
This momentary flash of 'highlighting' colour is a bit distracting. Are
there other events I could use to achieve the same visual cueing yet avoid
the flash?

T.I.A.

Geoff



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 371
Default OptionButton visual cueing

Hi Peter
Your supposition was correct and your suggestion worked too.

Thank you.

Geoff

"Peter T" wrote:

Hi Geoff,

Not sure I follow. If (?) you mean when user selects the option button with
mouse you DON'T want forecolor to change from blue to red, because code in
the mouseup event will go on to select another control, perhaps reset colour
to vbBlue in the Mousedown event. The mousedown event would file so soon
after the Enter event the colour change would not be noticeable.

Regards,
Peter T

"Geoff" wrote in message
...
I'm being pernickety but....

On a form say there are 3 optbtns amongst textboxes and comboboxes.
To enhance the marquee cue when an optbtn has focus I change its

forecolour
using:
Private Sub optbtn1_Enter()
optbtn1.ForeColor = vbRed
End Sub

and on exit:
Private Sub optbtn1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
optbtn1.ForeColor = vbBlue
End Sub
etc etc

This is fine when tabbing around the form and then selecting a control

using
the spacebar.
However there is a little niggle when it comes to selecting a control

which
does not have focus for example:
Say optbtn3 has focus (red) and the user wishes to select optbtn1 with the
mouse. On MouseDown, optbtn1's Enter event is fired and its colour

changes
to red until MouseUp, code is executed and focus is moved elsewhere.
This momentary flash of 'highlighting' colour is a bit distracting. Are
there other events I could use to achieve the same visual cueing yet avoid
the flash?

T.I.A.

Geoff




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Programmatic access to visual basic project via Visual FoxPro Jim Rech Excel Programming 0 January 11th 07 01:53 PM
Make visual basic truely visual! GraphicalGuy Excel Programming 0 October 20th 06 05:53 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
OptionButton value Patrick Simonds Excel Programming 2 January 17th 05 10:50 AM


All times are GMT +1. The time now is 08:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"