RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenuItem.OnMeasureItem Event

Occurs on owner-draw menu items to determine menu item size before the menu is drawn.

Pascal
property OnMeasureItem: TMenuMeasureItemEvent;
C++
__property TMenuMeasureItemEvent OnMeasureItem;

Write an OnMeasureItem event handler to indicate the size of owner-draw menu items. If the menu item is using a bitmap image, the event handler can use the Bitmap property or the ImageIndex property to access the bitmap to determine its size.

Note: OnMeasureItem will only occur if the parent menu's OwnerDraw property is true or the parent menu's Images property has been set.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!