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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I assign tab order for combo box & Text box? 1

Status
Not open for further replies.

spook007

Programmer
May 22, 2002
259
US
I have a page that contains several controls, (buttons, text box, combo box). I would like the focus to be toggled between the combo box and text box only. I created an invisible button and added the following code to it:

on (keypress &quot;<Tab>&quot;) {
if (Selection.getFocus() == &quot;root.options&quot;) {
Selection.setFocus(&quot;root.search&quot;);
} else if (Selection.getFocus() == &quot;root.search&quot;) {
Selection.setFocus(&quot;root.options&quot;);
}
}

When I try to toggle now, nothing happens. I think the above code works for text boxes, but how can I get the combo box to work as well. Any suggestions would be appreciated. Thanks!
 
>> I created an invisible button and added the following code to it

I'm not sure if this is the problem but try putting that code rather in one of the frames, rather than a button.
 
have you tried just using tabindex


this.myInstanceTextField.tabIndex = 1
this.myInstanceComboBox.tabIndex = 2


if that dont do it try setting all other tabable objects to have a tabindex of 0
 
I went ahead and added the tabIndex to reference the tab order that I would like for my components. The first component is my combo box. When I press tab nothing happens, but when I push Shift + tab, it does cycle through the order in reverse. I've attached the link if anyone brave enough is willing to take a look at the code. Thanks!

 
I've solutionized my own problem... I had my components in Movie Clips. Once I had the raw components in place they worked just fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top