RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenuItem.OnDrawItem Event

Occurs when an owner-draw menu needs to be drawn.

Pascal
property OnDrawItem: TMenuDrawItemEvent;
C++
__property TMenuDrawItemEvent OnDrawItem;

Write an OnDrawItem event handler to render the image of a menu item in an owner-draw menu. In the event handler, use the Bitmap property or the ImageIndex property to access a bitmap that represents the menu item.

Note: OnDrawItem will only occur if the parent menu's OwnerDraw property is true or the parent menu's Images property has been set.
Tip: For more precise information about the menu item's state, use the OnAdvancedDrawItem event instead.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!