RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomLabel.DoDrawText Method

Renders the text in the client area.

Pascal
procedure DoDrawText(var Rect: TRect; Flags: Longint); dynamic;
C++
__fastcall DoDrawText(TRect Rect, Longint Flags);

When the label needs to draw itself, DoDrawText is implicitly called. DoDrawText uses the Windows API function, DrawText, to render the caption in the client area.  

The first parameter, Rect, specifies the boundaries of the text within the client area. The second parameter, Flags, specifies how the text is aligned within those boundaries, how tab characters are handled, etc. See the Microsoft Windows API DrawText function for all the possible values of Flags. 

Override DoDrawText to render text differently. 

 

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