DesktopUIControl.PanelIndex

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Integer )
aDesktopUIControl.PanelIndex = newIntegerValue
or
IntegerValue = aDesktopUIControl.PanelIndex

New in 2021r3

Supported for all project types and targets.

If the control has been placed on a DesktopTabPanel or DesktopPagePanel control, this is the panel (page/tab) that the control is on. If the control is not on a panel, it returns -1.

Notes

The first panel is numbered zero. If the control has been placed on a panel of a DesktopTabPanel or DesktopPagePanel control, it returns the panel number. If the control is not on a DesktopPagePanel or DesktopTabPanel, it returns -1. If you change the PanelIndex to a nonexistent panel, the control will disappear until you give it a PanelIndex value that corresponds to a panel that exists.

If you are looking to change the currently selected panel (page/tab), use DesktopPagePanel.SelectedPanelIndex.

Sample Code

This code displays the panel index of the control that is on the page.

MessageBox(Me.SelectedPanelIndex.ToString)

See Also

DesktopPagePanel.SelectedPanelIndex