Vcl.Controls.THintWindow.CalcHintRect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CalcHintRect(MaxWidth: Integer; const AHint: string;  AData: TCustomData): TRect; virtual;

C++

virtual System::Types::TRect __fastcall CalcHintRect(int MaxWidth, const System::UnicodeString AHint, void * AData);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls THintWindow

Description

Returns the size needed to display a given hint.

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.

See Also