TMenuItem.DoDrawItem function
Performs actions needed to draw the menu item to the specified Canvas.
Declaration
function DoDrawItem(ACanvas: TCanvas; ARect: TRect;
AState: TOwnerDrawState): Boolean; virtualArguments
ACanvas | Canvas where the menu item is drawn. |
ARect | Display rectangle for the menu item. |
AState | Owner-draw state for the menu item. |
Function result
True if the menu item was rendered using an OnDrawItem event handler.Description
DoDrawItem is a
Boolean function which performs actions
needed to draw the menu item to the specified canvas with the given
owner-drawn state.
DoDrawItem signals the OnDrawItem event handler (when assigned) to
render the menu item to the canvas specified in ACanvas using the
arguments passed to the method. The return value is set to True when
the drawing operation is completed.
If OnDrawItem has not been assigned in the menu item, the
GetParentMenu method is called to get the TMenu
instance where the menu item is located. Its OnDrawItem event handler is
signalled (when assigned) to render the menu item to the canvas specified in
ACanvas using the arguments passed to the method. The return value is set to
True when the drawing operation is completed.
If neither OnDrawItem event handler has been assigned, no actions are performed in the method and the return value is set to False.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
