Вопрос

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