Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to tab option buttons ?

Status
Not open for further replies.

eGGz

Technical User
Jun 25, 2000
32
US
If I simply put severial option buttons on a form, by default their tabindex is set. IE: 0, 1, 2, etc. However when running the app pressing the tab key does not index to the various option buttons.

Can anyone shed any light on this.

Thanks In Advance.

eGGz RaTTuS
I cna ytpe 300 wrods pre mniuet.
 
Hi,
In the properties window for each option button make sure the TabStop is set to True

Jon
 
You can not tab through an Option Button group after an option has been set UNLESS you set TabStop=True for every option button in the group in the Click Event. This happens because when an option button is set, its tab stop is set to true and the tabstop property for every other option button in that group is set to false.
From the Docs
"A control whose TabStop property has been set to False still maintains its position in the actual tab order, even though the control is skipped when you cycle through the controls with the TAB key.

Note An option button group has a single tab stop. The selected button (that is, the button with its Value set to True) has its TabStop property automatically set to True, while the other buttons have their TabStop property set to False." Compare Code (Text)
Generate Sort in VB or VBScript
 
Yes!, John, thank you very much.

I did exactly what you said:

Option1.TabStop = True
Option2.TabStop = True
etc. etc.

for every option button in the group, in the Click Event.

Works like a charm. Thanks again, You're a lifesaver.

eGGz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top