Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top