Difference between revisions of "MenuItem.MenuAt"

From Xojo Documentation

m (Gperlman moved page MenuItem.MenuValueAt to MenuItem.MenuAt without leaving a redirect)
Line 23: Line 23:
 
Var c As MenuItem
 
Var c As MenuItem
 
c = EditMenu.MenuAt(2)
 
c = EditMenu.MenuAt(2)
MsgBox(c.Value)
+
MessageBox(c.Value)
 
</rbcode>
 
</rbcode>

Revision as of 02:07, 29 August 2019

Method

MenuItem.MenuAt(Index as Integer) As MenuItem

New in 2019r2

Supported for all project types and targets.

Item returns as a MenuItem the item indicated by its index (zero-based).

Notes

If the passed index is out of range, an OutOfBoundsException is raised.

Example

The following example gets the MenuItem corresponding to the Cut item on the Edit menu by position:

Var c As MenuItem
c = EditMenu.MenuAt(2)
MessageBox(c.Value)