[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Specifies an event handler signalled to get the width and height for a menu item.
Source position: menus.pp line 117
type TMenuMeasureItemEvent = procedure( |
Sender: TObject; |
ACanvas: TCanvas; |
var AWidth: Integer; |
var AHeight: Integer |
) of object; |
Sender |
|
Object (TMenuItem) for the event notification. |
ACanvas |
|
Canvas where the menu item is drawn. |
AWidth |
|
Width needed for the menu item. |
AHeight |
|
Height needed for the menu item. |
TMenuMeasureItemEvent is an object procedure type which specifies an event handler signalled to get the width and height for a menu item.
Cast the value in Sender (when assigned) to a TMenuItem type to access properties and methods for the menu item.
Use ACanvas to access values for the TCanvas instance where the menu item is drawn.
AWidth and AHeight are variable arguments updated in the event handler with the dimensions for the menu item.
TMenuMeasureItemEvent is the type used to implement the OnMeasureItem property in TMenu and TMenuItem.
|
Event handler signalled to get the width and height for a menu item on the menu. |
|
|
Event handler signalled to get the Width and Height for the menu item. |
Version 3.2 | Generated 2024-02-25 | Home |