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

# TMenuItem.UpdateImage

Updates the image associated with the menu item.

## Declaration

Source position: menus.pp line 288

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

## Description

No actions are performed in the method during LCL component streaming, or when the class instance is freed.

UpdateImage calls GetImageList to retrieve the list of images used in the menu item, its Parent, or its sub-menu items.

An image assigned directly to the Bitmap property is freed and invalidated when both the image list and the ImageIndex have been assigned.

If the handle for the menu item has been allocated, the UpdateWSIcon method in the widgetset class is called to apply the Bitmap or Image to the widget.

UpdateImage is called when a new value is assigned to the GlyphShowMode property, and from the UpdateImages method.