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

# TMenuItem.BitmapChange

Updates the image associated with the menu item when it has been changed.

## Declaration

Source position: menus.pp line 230

`protected procedure TMenuItem.BitmapChange(`
`Sender: TObject`
`);`

## Description

BitmapChange is a method used to updates the image associated with the menu item when it has been changed. BitmapChange calls the UpdateImage method retrieve the Images or SubMenuImages for the item, its ancestor items, or the parent menu.

If an image is already assigned to the Bitmap property, it is freed. The value in ImageIndex is used to access the relevant bitmap in the image list. -1 indicates that a bitmap image has not been assigned for the menu item.

If the Handle for the control has been allocated, the widget set class is notified of the change to the property value.

BitmapChange is used as the OnChange event handler for the Bitmap property.