Updated: Dec 16, 2023
Follow on twitter

Showing/hiding of a hint window.

  1. If hint must be shown and hidden manually, then acShowHintWnd and acHideHintWnd functions may be used:

    function acShowHintWnd(HintText: string; Pos: TPoint): THintWindow; procedure acHideHintWnd(var Wnd: THintWindow);

    acShowHintWnd function returns the THintWindow which may be closed later by the acHideHintWnd procedure. They are declared in the sVCLUtils.pas unit.


  2. Also, the TsAlphaHints component has own ShowHint and HideHint methods:

    procedure ShowHint(TheControl: TControl; const HintText: string; HideTime: Cardinal = 0); procedure ShowHint(Position: TPoint; const HintText: string; HideTime: Cardinal = 0); procedure ShowHint(ShowHintData: TacShowHintData; HideTime: Cardinal = 0); procedure HideHint;

    ShowHint procedure has the HideTime parameter there. If this parameter is not null, then hint will be hidden automatically when this time is finished. The ShowHintData is an extended information which may be specified by developer for showing of hint (for example, may be defined an image which will be shown in the hint window):

    TacShowHintData = record Width, Height: integer; Position: TPoint; Caption: acString; Control: TControl; Image: TBitmap; ImageAlignment: TacSide; end;

    Demonstration program with more unique features may be downloaded here .






Installing, using and licensing the demo programs © Sergii Goncharov, Ukraine, Odessa 2004-2023