From RAD Studio API Documentation
Jump to: navigation, search


property OnHint: TNotifyEvent read FOnHint write FOnHint;


__property System::Classes::TNotifyEvent OnHint = {read=FOnHint, write=FOnHint};


Type Visibility Source Unit Parent
event public
Vcl.Forms TApplication


Occurs when the mouse pointer moves over a control or menu item that can display a Help Hint.

Write an OnHint event handler to perform special processing when the mouse pauses over a control or menu item whose Hint property is not an empty string.

A common use of the OnHint event is to display the value of a control or menu item's Hint property in another control. Note that it is not necessary to use an OnHint event handler to display hints on a status bar. The status bar will automatically display hints if you set its AutoHint property to True.

The Hint property of a control can specify both a short hint (GetShortHint) and a long hint (GetLongHint) that appear elsewhere because of the code in an OnHint event handler. See Vcl.Controls.TControl.Hint.

Note: You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.

Tip: Component writers can respond to the automatically fired THintAction action in a component's ExecuteAction method rather than relying on an OnHint event handler.

See Also

Code Examples