[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Performs actions needed to get the width and height for the menu item.
Source position: menus.pp line 227
protected function TMenuItem.DoMeasureItem( |
ACanvas: TCanvas; |
var AWidth: Integer; |
var AHeight: Integer |
):Boolean; virtual; |
ACanvas |
|
Canvas used to get size information for the menu item. |
AWidth |
|
Calculated width for the menu item. |
AHeight |
|
Calculated height for the menu item. |
True if the size was calculated using an OnMeasureItem event handler.
DoMeasureItem is a method used to perform actions needed to get the width and height for the menu item. DoMeasureItem signals the OnMeasureItem event handler (when assigned) to calculate the values in AWidth and AHeight. The TCanvas instance in ACanvas is used to get the text metrics for the Caption.
If the OnMeasureItem event handler has not been for the menu item, the OnMeasureItem event handler in the Parent menu is used.
The return value is set to True after the selected event handler is successfully executed.
DoMeasureItem is called from the MeasureItem method in the TMenuItemHelper class helper. This class helper is implemented for the Windows platform only.
Version 3.2 | Generated 2024-02-25 | Home |