From Xojo Documentation

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

Property (As Integer )
aPopupMenu.SelectedRowIndex = newIntegerValue
IntegerValue = aPopupMenu.SelectedRowIndex

New in 2019r2

Supported for all project types and targets.

Used to get or set the selected item number. The first item is numbered zero.


A value of -1 means no selection. SelectedRowIndex may be set using the Properties pane to set the default value of PopupMenu control. If you use the InitialValue property to populate the PopupMenu control and set a value of SelectedRowIndex that corresponds to a default item, that item will be displayed in the IDE.


The following example changes the selected item to the third item:

FruitMenu.SelectedRowIndex = 2