From Xojo Documentation

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

Property (As Integer )
aDesktopPagePanel.SelectedPanelIndex = newIntegerValue
IntegerValue = aDesktopPagePanel.SelectedPanelIndex

New in 2021r3

Supported for all project types and targets.

The number of the currently selected panel. The first panel is number zero.


To change the panel that is displayed, set this value. Modifying this value calls the PanelChanged event.

This is also how you change the displayed panel for the DesktopTabPanel control, which is subclassed from DesktopPagePanel.


This example uses a DesktopPopupMenu in a DesktopPagePanel to navigate to another panel. The example uses the selected item on the DesktopPopupMenu as the panel in the DesktopPagePanel to display.

PagePanel1.SelectedPanelIndex = PopupMenu1.SelectedRowIndex