Sign in Join
FPDoc Onlineexperiment

TMenuItem.HasIcon function

Member of TMenuItempublicIn unit Menus

True when a bitmap is configured and available for the menu item.

Declaration

pascal
function HasIcon: Boolean; virtual

Function result

True when a bitmap is configured and available for the menu item.

Description

HasIcon is a Boolean function which indicates if a Bitmap is configured and available for the menu item. The menu item is configured to display a bitmap using the GlyphShowMode and ImageIndex properties, or by assigning a TBitmap value to the Bitmap property.

The return value is False for the following conditions:

  • GlyphShowMode is set to gsmNever.
  • GlyphShowMode is set to gsmApplication and TApplication.ShowMenuGlyphs is set to sbgNever.
  • GlyphShowMode is set to gsmSystem and SystemShowGlyphMenus returns False.
  • An image list is not available or ImageIndex contains an invalid index.
  • Bitmap has an empty image.

See also

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