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

# TMenuItem.OnDrawItem

Event handler signalled to draw the menu item.

## Declaration

Source position: menus.pp line 352

`published property TMenuItem.OnDrawItem : TMenuDrawItemEvent read FOnDrawItem write FOnDrawItem;`

## Description

OnDrawItem is a TMenuDrawItemEvent property with the event handler signalled to draw the menu item. OnDrawItem is signalled (when assigned) from the DoDrawItem method using the canvas, rectangle, and drawing state passed as arguments.

A menu item may use the OnDrawItem handler found in a parent Menu if it does not have one of its own.

## See also

TMenuItem.Menu |  | Menu where the menu item is displayed.
TMenuItem.Parent |  | The parent menu item for the class instance.
TMenuItem.DoDrawItem |  | Performs actions needed to draw the menu item to the specified Canvas.
TMenu.OnDrawItem |  | Event handler signalled to draw a menu item on the menu.
TMenuDrawItemEvent |  | Specifies an event handler signalled to draw a menu item on the given canvas.