PDA

View Full Version : Beta 3: How to select a specific Tab in a TabPanel



gishmo
20 Feb 2012, 1:26 AM
I would like to select a specific tab in a TabPanel depending on values.

How can I do this?

Colin Alworth
22 Feb 2012, 8:58 PM
If you already know which existing item added to the tab panel you want to select, pass it into TabPanel.setWidget(Widget). It is possible to iterate through the widgets in the TabPanel with getWidgetCount() and getWidget(int), and to get the configuration of a tab based on its contents with getConfig(Widget) (and modify it with update(Widget, TabItemConfig).

Or are we missing some important piece to allow configuring and controlling the tab panel? I know the docs are lacking, but the methods seem capable of what you are trying to do.

gishmo
23 Feb 2012, 11:39 AM
Thank you, Colin, you missed nothing.

Your hints directed me in the right direction! :-)
My fault, I was looking for something i Knew from GXT 2.x