How can I dynamically set a tab index in ExtJS? I can't see anything in the docs for it, only a config option for it. If I try to do an .apply, it still doesn't work. I know I can probably extend the framework to support this since it is just a DOM element, but I'm sure I'm missing something simpler. Help?
A:
See the setActiveTab
method of a tabPanel, which accepts either a string (id of the tab element) or an integer.
Drasill
2010-07-12 20:45:43
Sorry, I'm not talking about a tabPanel. I'm talking about the tab index for navigating through a page with the "tab" button.
extnoob
2010-07-12 21:01:43
So sorry ;)I would answer like J.Barrows.
Drasill
2010-07-13 07:49:10
+1
A:
It seems that in the extjs code for field they do this:
this.el.dom.setAttribute('tabIndex', this.tabIndex);
Jim Barrows
2010-07-12 23:14:17
A:
you can use the set method of the Element class which you can retrieve using the get method, so something like this: Ext.get('YOURELEMENTID').set({tabIndex:5});
SBUJOLD
2010-07-13 14:12:35