RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
THintWindow.CalcHintRect Method

Returns the size needed to display a given hint.

Pascal
function CalcHintRect(MaxWidth: Integer; const AHint: string; AData: Pointer): TRect; virtual;
C++
virtual __fastcall TRect CalcHintRect(int MaxWidth, const AnsiString AHint, void * AData);

Call CalcHintRect to determine the size needed to display a hint window for a specified string and data value. The MaxWidth parameter limits how wide the Hint window can grow before the text wraps to a new line. 

MaxWidth is the maximum length, in pixels, for the hint window. If the hint requires more than this width, the text in the hint window wraps to a new line. 

AHint is the hint string that appears in the hint window. 

AData is data associated with the AHint.

Note: CalcHintRect ignores the AData parameter. Descendant classes can override this method to make use of associated hint data.
 

 

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