PDA

View Full Version : BorderLayout find an open tab



brant
28 Oct 2006, 11:39 AM
I'm playing around with the recent BorderLayout and was wondering how to find a tab by ID?

YAHOO.ext.TabPanelItem getTab(<String> id);

I want to check and see if I'm already displaying the tab, and if so just activate that tab, if not I'll add the tab.

Thanks,
Brant

jack.slocum
28 Oct 2006, 2:21 PM
If you know what region it's on (I use west below), you can call:

layout.getRegion('west').getPanel('id'); - it doesn't return the tab, it returns the ContentPanel.

You can search all regions for a panel:

layout.findPanel('panel-id');

Do you need the actual TabPanelItem for some reason?