PagePanel.LastAddedPanelIndex

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aPagePanel.LastAddedPanelIndex

New in 2019r2

Supported for all project types and targets.

The number of the last Panel added with the AddPanel or AddPanelAt methods. LastAddedPanelIndex is zero-based. If no panels have been added, LastAddedPanelIndex will be -1.