MenuItem.Child

From Xojo Documentation

Method

MenuItem.Child(Name As String) As MenuItem

New in 5.0

Supported for all project types and targets.

Looks up menu items by Name and returns a MenuItem. Returns Nil if a child is not found.

Example

The following example gets the text of the Edit ↠ Cut menuitem.

Var c As MenuItem
c = EditMenu.Child("EditCut")
MessageBox(c.Value)


Method

MenuItem.Child(Text As String) As MenuItem

Supported for all project types and targets.

Looks up menu items by Text and returns a MenuItem. Returns Nil if a child is not found.