Vcl.Menus.TPopupMenu.OwnerDraw
Delphi
property OwnerDraw: Boolean read FOwnerDraw write SetOwnerDraw default 0;
C++
__property OwnerDraw = {default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.Menus.pas Vcl.Menus.hpp |
Vcl.Menus | TPopupMenu |
Description
Specifies whether the menu items are drawn by the application.
Vcl.Menus.TPopupMenu.OwnerDraw inherits from Vcl.Menus.TMenu.OwnerDraw. All content below this line refers to Vcl.Menus.TMenu.OwnerDraw.
Specifies whether the menu items are drawn by the application.
Set OwnerDraw to true to indicate that the application will draw menu items in an OnDrawItem event handler. When OwnerDraw is true, menu items receive an OnMeasureItem and an OnDrawItem event when they need to be rendered on screen.
Set OwnerDraw to false to accept the default drawing. When OwnerDraw is false, menu items display the caption with an optional image to the left (If the Images and ImageIndex properties are set).
Owner-draw menus are useful for displaying the value that appears when selecting a menu item. For example, in a menu that allows users to choose a color, an owner-draw menu could display rectangles drawn in the designated color, rather than color names.