Bitmap image (glyph) displayed for the menu item.
Source position: menus.pp line 332
published property TMenuItem.Bitmap : TBitmap |
Bitmap is a TBitmap property which contains the bitmap image displayed as a glyph for the menu item.
The value in Bitmap can be set by assigning a TBitmap instance to the property. It may also be retrieved from images in the parent menu (or an Action list) using the ImageIndex property. The assignment mechanisms are not used at the same time. A value assigned directly to the Bitmap property overrides the setting in ImageIndex.
When loading the bitmap in the property using ImageIndex, the image width and height are automatically scaled (when needed) using the canvas scaling factor for the active screen form.
Changing the value in Bitmap causes the UpdateWSIcon method to be called to post the change to the widgetset class. The MenuChanged method is called to signal the OnChange event handler (when assigned).
Use GlyphShowMode to control use the visibility of the glyph image for the menu item.
Modified in LCL version 4.4 to scale a bitmap (when needed) when loaded using ImageIndex instead of an image directly assigned to the menu item. Fixes an issue for Retina displays on macOS - but it applies to any high DPI display.
|
Indicates whether a TBitmap instance has been assigned to the Bitmap property. |
|
|
Ordinal position in the list of images for the glyph displayed on the menu item. |
|
|
The parent menu item for the class instance. |
|
|
Gets the size for the icon (glyph) when used on the menu item. |
|
|
Gets an image list with the available bitmaps for the menu item. |
|
|
Indicates the display behavior for the glyph (or Bitmap) on the menu item. |
|
|
Updates the widgetset class with the values in HasIcon and Bitmap. |
| Version 4.4 | Generated 2025-11-08 | Home |