RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStandardMenuItem.DrawText Method

Draws the menu item's text.

Pascal
procedure DrawText(var Rect: TRect; var Flags: Cardinal; Text: String); override;
C++
virtual __fastcall DrawText(TRect Rect, unsigned Flags, AnsiString Text);

DrawText is called automatically when the menu item needs to render its text.  

ARect indicates the rectangle on the menu item's canvas where the text label should appear. 

Flags supplies the value to use for the TextFlags property of the canvas. 

Text is the text of the menu item. 

DrawText checks whether the menu item should display underlines on accelerator keys, and draws the text accordingly, using a font color that reflects whether the menu item is selected and whether it is enabled. 

 

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