Control.PanelIndex

From Xojo Documentation

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

New in 2005r1

Supported for all project types and targets.

If the control has been placed on a TabPanel or PagePanel 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 TabPanel or PagePanel control, it returns the panel number. If the control is not on a PagePanel or TabPanel, 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 PagePanel.Value.

Sample Code

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

Label3.Value = Str(Me.PanelIndex)

See Also

PagePanel.Value