RAD Studio VCL Reference
TMenuItem.ImageIndex Property

Indicates which image maintained by the parent menu appears next to the menu item.

property ImageIndex: TImageIndex;
__property TImageIndex ImageIndex;

Set ImageIndex to designate an image that should appear next to the caption when the menu item is drawn. On top-level menu items, ImageIndex specifies a zero-offset index into the Images property of the parent menu (TMenu or TPopupMenu). On submenu items, ImageIndex is the zero-offset index into the parent item's SubMenuImages property. 

If the parent menu or item does not maintain a list of images, use the Bitmap property to provide an image for a single menu item. However, any image specified by ImageIndex takes precedence over the Bitmap property. Bitmap is only used when ImageIndex has a negative value or the parent's Images or SubMenuImages property is nil (Delphi) or NULL (C++).

Note: This property is not stored with the menu item if it is supplied by a TAction object.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!