DesktopPopupMenu.SelectedRowIndex

From Xojo Documentation

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

Property (As Integer )
aDesktopPopupMenu.SelectedRowIndex = newIntegerValue
or
IntegerValue = aDesktopPopupMenu.SelectedRowIndex

New in 2021r3

Supported for all project types and targets.

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

Notes

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.

Example

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

FruitMenu.SelectedRowIndex = 2