-A hint is a pop-up message that appears briefly while the mouse hovers over a -control. It usually displays useful information about how to use the UI -element, or the type of data that should be entered, etc. +A hint is a String with a pop-up message that appears briefly while the mouse +is hovered over a control. It usually displays useful information about how to +use the UI element, or the type of data that should be entered, etc. +
++The property value is normally provided by the Hint text assigned to a +control when ShowHint is set to True (for both the control and the +application). If the Hint text for the control has short and long variants, the +long variant is used in TApplication. Otherwise, the short variant is used for +the property value. See +TControl.Hint for more +information about short and long hints. +
++Changing the property value causes an assigned OnHint handler to be signalled, +along with any other application handlers using the ahtHint type. One of the +handlers can be used to override the value for the Hint property. If OnHint (or +other handlers) are not assigned, a TCustomHintAction is created and executed +to get the value for the Hint property. OnActionExecute can then be used to +intercept and fulfill the request for Hint text.
Other properties can be used to customize the delay before a Hint is shown, after the mouse is moved away from the control or form, and how long it will -remain visible. +remain visible. See HintPause, HintShortPause, HintHidePause, and +HintHidePausePerChar. +
++Use HintColor to specify the background color used to display the pop-up with +the Hint text. +
++The Hint value may be displayed on the status bar for the active Form (instead +of in a pop-up hint window) when the AutoHint property is enabled for a +TStatusBar instance.
-OnHint is a TNotifyEvent property with the event -handler signalled when the value for the Hint property has been -changed in the application. It is signalled (when assigned) from the -SetHint method, and occurs before other application handlers using -the ahtHint handler type are notified. +OnHint is a TNotifyEvent property with the event handler +signalled when the value for the Hint property is needed in the +application. It is signalled (when assigned) when a new value is assigned to +the Hint property, and occurs when the mouse is hovered over a control. +
++OnHint, and other application handlers using the ahtHint type, can be used to +override the value assigned to the Hint property. OnHint occurs before other +application handlers using the ahtHint handler type are notified. +OnHint can be implemented to provide hint text using any method needed for the +application; it does not have to use the Hint text for the hovered control. +
++If OnHint (or other handlers) are not assigned, a TCustomHintAction is created +and executed to get the value for the Hint property. OnActionExecute can then +be used to intercept and fulfill the request for Hint text.
ShowHint is a Boolean property which indicates if Hints are displayed for the application. It is used when tracking the position of the mouse cursor over controls and forms, and determines if -the items require a hint display. +the items require a hint display. The value is used in ShowHintWindow to +determine whether the hint window can be activated for the application.
-Setting the value in ShowHints to False causes an existing -THintWindow instance in the application to be freed. +The default value for the property is True. Setting the value in +ShowHint to False causes an existing THintWindow +instance in the application to be freed. +
++Use the Hint, ShowHint, and ParentShowHint properties in TControl to determine +whether that particular control can display a hint.