سؤال

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