开发者

ExtJS Dynamically setting tab index

开发者 https://www.devze.com 2023-01-07 12:46 出处:网络
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 probab

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

精彩评论

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