Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top