[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Menus' (#lcl)

# TMenu.SetChildOrder

Sets the order for the menu item specified in Child.

## Declaration

Source position: menus.pp line 402

`protected procedure TMenu.SetChildOrder(`
`Child: TComponent;`
`Order: Integer`
`); override;`

## Description

SetChildOrder is an overridden method used to set the order for the specified child in the menu instance. It ensures that the value in Child is cast to a TMenuItem instance before assigning the value in Order to its MenuIndex property.

## See also

TMenu.Items |  | Contains the menu items displayed on the menu.
TMenuItem.MenuIndex |  | Ordinal position for the menu item in its Parent.
TComponent