开发者

ExtJS Dynamically setting tab index

How can I dynamically set a 开发者_JAVA技巧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?


It seems that in the extjs code for field they do this:

this.el.dom.setAttribute('tabIndex', this.tabIndex);


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});


If you want to include buttons in the tabindex, i'm afraid they have to be addressed seperatley:

this.btnEl.dom.setAttribute('tabIndex', this.tabIndex);


See the setActiveTab method of a tabPanel, which accepts either a string (id of the tab element) or an integer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜