PDA

View Full Version : [noob] How do you set the active item/tab in a tab panel?



orangechicken
28 Jul 2010, 3:52 PM
This seems like it should be totally trivial, but I'm not seeing an official way. I see TabPanel#getActiveItem, but there's no corresponding setActiveItem. I want to programmatically set the active tab.

evant
28 Jul 2010, 5:55 PM
setCard.

http://www.sencha.com/deploy/touch/docs/?class=Ext.layout.CardLayout

kalor
30 Nov 2011, 7:47 PM
appears to now be setActiveItem.

myput
1 Dec 2011, 12:08 AM
you have your tabPanel for example: viewTabPanel.
in this panel some items: (your views for each tabPanel)
item1, item2, item3

the way to use setActiveItem:
you can do

viewTabPanel.setActiveItem(item1);
you setActiveItem an item of the container

hope this helps