Vcl.Forms.TApplication.Hint

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Hint: string read FHint write SetHint;

C++

__property System::UnicodeString Hint = {read=FHint, write=SetHint};

Properties

Type Visibility Source Unit Parent
property public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TApplication

Description

Specifies the text string that appears in the Help Hint box.

The Hint property stores the Hint value of the control or menu item that appears in the Help Hint box when the mouse is moving over the control. It can also be assigned a string value that informs the user of an action, error, or something else. Therefore, use Hint either to:

  • Transfer hints from controls to another area of display, such as a status bar, using the OnHint event handler. This reads the Hint property.
  • Indicate the status of the application while it is processing an action. This sets the Hint property.

Help Hints appear when the OnHint event occurs. Therefore, if the TApplication's Hint property is assigned to the status bar's caption, for example, the caption of the status bar control displays the current string value of the Hint property during an OnHint event.

There are two parts to the Hint string--short and long--separated by the | character. Short hints are used by pop-up tool tips. Long hints are used by the status bar. Use the GetShortHint and GetLongHint global functions from the Controls unit to extract the long and short hints from a hint string.

Note: When setting a Hint to a message informing the user of an event occurring in the application, remember that, by default, the Hint string is reset to a control's Hint when the mouse cursor moves over a control.

See Also

Code Examples