문제

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