TabStrip.setSelectedTab

Overview | Methods | This Package | All Packages

TabStrip.setSelectedTab

Selects the specified tab in this tab strip.

Syntax

public final int setSelectedTab( TabItem tab )

public final int setSelectedTab( String text )

Parameters

tab

A TabItem object that represents the tab to select in this tab strip.

text

The text for the tab to select.

Return Value

Returns the zero-based index of the specified tab if it is found in the tab strip; returns -1 if the tab is not found.

Exceptions

WFCInvalidStateException thrown if the specified tab is not found in this tab strip.

Remarks

If you specify a tab that is not contained in this tab strip, no tab will be selected. This method uses the equals method to determine whether the TabItem object passed in the item parameter or created from the text parameter is equal to one of the tabs contained in this tab strip.

See Also   getSelectedTab