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

# TMenuItem.UpdateImages

Update the images for the menu item and its child items.

## Declaration

Source position: menus.pp line 289

`public procedure TMenuItem.UpdateImages(`
`forced: Boolean = False`
`);`

## Arguments

`forced` |  | True causes an image assigned to Bitmap to be invalidated - even when an image list is not available or an image index has not been specified.

## Description

UpdateImages is a method used to ensure that changes to image settings in the menu item (or its parent) are applied the menu item and its child Items. It is called when a new image list is assigned to the owner Menu, to the Parent menu item, or to the SubMenuImages for the menu item. It is also called if the image width is changed (which causes the image list to be updated).

Forced indicates whether an existing image assigned directly to Bitmap is invalidated - even when an image list or image index is not available for the menu item.

UpdateImages calls the UpdateImage method in the class instance to apply changes to Bitmap (when needed) and to notify the widget of the new icon. It calls the UpdateImages method for each of the Items to cascade the change to sub-menu items.

## See also

TMenuItem.Bitmap |  | Bitmap image (glyph) displayed for the menu item.
TMenuItem.ImageIndex |  | Ordinal position in the list of images for the glyph displayed on the menu item.
TMenuItem.Menu |  | Menu where the menu item is displayed.
TMenuItem.Parent |  | The parent menu item for the class instance.
TMenuItem.Items |  | Provides indexed access to the child menu items for the current class instance.
TMenu.ImagesWidth |  | Width for the bitmaps in the Images property.
TMenu.Images |  | The image list with bitmaps used as glyphs for the menu items.