WebTabPanel

From Xojo Documentation

Class (inherits from WebPagePanel)


New in 2020r1

Used to organize controls into groups of tabs that can be selected by the user. Only the controls on the selected tab are visible.

Events
Closed Opening Resized
ContextualMenuSelected Overflowed Shown
Hidden PanelChanged
Properties
ContextualMenu Left Parent fa-lock-32.png
ControlID fa-lock-32.png LockBottom fa-lock-32.png SelectedPanelIndex
Enabled LockHorizontal fa-lock-32.png Style
HasBorder LockLeft fa-lock-32.png TabIndex
Height LockRight fa-lock-32.png Tooltip
Indicator LockVertical fa-lock-32.png Top
LastControlIndex Name fa-lock-32.png Visible
LayoutDirection Page fa-lock-32.png Width
LayoutType PanelCount fa-lock-32.png
Methods
AddControl ExecuteJavaScript LastPanelIndex
Close GotoURL SetFocus
ControlAt LastPanelIndex UpdateBrowser

Notes

Getting and Setting the displayed Panel

Use the SelectedPanelIndex property to get and set the tab panel being displayed. The PanelCount property gives you the number of panels in the WebTabPanel as it is a subclass of WebPagePanel.

The following line of code moves a ListBox from its current panel to the second panel of a WebTabPanel.

ListBox1.PanelIndex = 1

Adding, Labelling, and Renaming Tabs

In the Inspector, click the value of the Panels property of the TabPanel to display the Tab Panel editor. From this dialog box, you can:

  • Rename the existing tab labels by clicking twice on its name and editing the name.
  • Add tabs and their labels by clicking the Add button.
  • Delete any tab by highlighting it and clicking Delete.
  • Rearrange the tabs by highlighting a tab and clicking the Up or Down buttons.

You add controls to a particular panel by clicking its tab and dragging controls to that panel.

Placing Controls on Tab Panels

You can place other controls on the surface of any tab panel. Such controls are visible only when the user clicks on that panel's tab to bring it to the front.

Placing WebTabPanels within a WebPagePanel (and vice versa) are not supported.

If the CaptionAt property contains an ampersand character, it will display only if it is preceded by another ampersand character. This is done to make applications on all platforms behave consistently. The ampersand character is used to indicate the keyboard accelerator on Windows.

Controls placed on TabPanels are referenced in your code just by using the control name as if it were not on a TabPanel:

 PushButton1.Caption = "OK"

See Also

WebPagePanel control.