Sign in Join
FPDoc Onlineexperiment

TMenuItem.SetImageIndex procedure

Member of TMenuItemprotectedIn unit Menus

Sets the value for the ImageIndex property.

Declaration

pascal
procedure 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.