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

# TMainMenu.MenuChanged

Implements the OnChange event handler used for menu items in the class instance.

## Declaration

Source position: menus.pp line 448

`protected procedure TMainMenu.MenuChanged(`
`Sender: TObject;`
`Source: TMenuItem;`
`Rebuild: Boolean`
`); override;`

## Arguments

`Sender` |  | Object of the change notification.
`Source` |  | Menu item for the change notification.
`Rebuild` |  | True to rebuild the child menu items for the menu.

## Description

MenuChanged is an overridden method in TMainMenu. It ensures that the CM_MENUCHANGED control message is forwarded to the WindowHandle (when assigned) where the menu is displayed. MenuChanged calls the inherited method prior to exit to signal the OnChange event handler (when assigned).

## See also

TMainMenu.WindowHandle |  | Handle for the window where the menu is displayed.
TMainMenu.OnChange |  | Event handler signalled when a menu item has been changed.