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

TMenuItem.SetImageIndex

Sets the value for the ImageIndex property.

Declaration

Source position: menus.pp line 243

protected procedure TMenuItem.SetImageIndex(

  AValue: TImageIndex

);

Arguments

AValue

  

New value for the ImageIndex property.

Description

Calls GetImageList to get the Images for the TMenu instance that owns the menu item, or the SubMenuImages from the Parent menu item. AValue indicates the position in the image list used as the property value.

If an image list could not be located, no additional actions are performed in the method. Otherwise, an existing value in Bitmap is freed and the UpdateWSIcon method is called to notify the widgetset class of the change to the property value. MenuChanged is called to signal the OnChange event handler (when assigned). The menu item hierarchy is not rebuilt.

See also

TMenuItem.ImageIndex

  

Ordinal position in the list of images for the glyph displayed on the menu item.


Version 3.2 Generated 2024-02-25 Home