TApplication.ShowHintWindow procedure
Shows or hides the hint window for a control in the application.
Declaration
procedure ShowHintWindow(const Info: THintInfoAtMouse)Arguments
Info | Contains information about the hint control, its mouse coordinates, and the hint text or data used in the method. |
Description
ShowHintWindow performs actions needed to display hint text in a
pop-up window for the control represented by the mouse coordinates in the
Info argument. No actions are performed in the method if ShowHint
has not been enabled, or a valid hint control cannot be determined for the
application.
ShowHintWindow maintains an internal THintInfo structure used to store information with the text for the hint, configuration information about its display window, and the control for the hint.
For a valid parented hint control, handler routines are signalled to check whether the hint can be displayed for the application. The OnShowHint event handler(s) are signalled first (when assigned) to determine the hint text or hint data. Additional OnShowHint handlers assigned using AddOnShowHintHandler are signalled next.
If the hint text or hint data was not assigned in the event handlers, the hint text for the hovered control is used. Only the first "|"-delimited line of text in TControl.Hint is used for the hint.
The hint window for the application is created (or re-created) and configured as needed. This includes setting the BiDiMode in the hint window to match the hint control, as well as the position and color for the hint window.
ActivateHintData is called to display the hint window when hint data is used in the hint information. ActivateHint is called to display the hint window when the hint information contains only hint text. The timer used to auto-hide the hint window is started using the hide or reshow timeout values found in the hint information.
If the hint control is not assigned (no longer hovered) or the hint text is empty, the HideHint method is called to hide an existing hint window.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
