I need activate the last tab in tabpanel in extjs. I have a button that adds new tabs and I need to change the last added.

有帮助吗?

解决方案

You can get the length of the items array and setActiveTab using that.

var last = tabPanel.items.length -1;
tabPanel.setActiveTab(last)

Here is fiddle demonstrating a simple working example.

Sencha docs is a huge help in figuring these things out.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top