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

TMenuItem.GetIconSize

Gets the size for the icon (glyph) used on the menu item.

Declaration

Source position: menus.pp line 289

public function TMenuItem.GetIconSize(

  ADC: HDC

):TPoint; virtual;

Arguments

ADC

  

Device context used to get the display density (PPI) for the glyph images.

Function result

TPoint instance with the width and height for the glyph displayed on the menu item.

Description

The return value is a TPoint instance with the Width and Height for the glyph displayed on the menu item.

Calls HasIcon to determine if GlyphShowMode allows (or requires) a glyph to be displayed for the menu item, and whether image(s) are available. When HasIcon returns True, the images available for the menu item are retrieved to get the Width and Height required for the device context in ADC. If an image list is not available, the Width and Height in Bitmap are used in the return value.