formhints OnShowHint event
Return to Introduction  Previous page  Next page
Applies to
acFormHints component.  

Declaration
type  
  TacOnShowHint = procedure(Sender: TObject; HintControl: TControl; Hint: Stringvar AllowShowHint, ShowStandardHint: Boolean) of object;  
 
property OnShowHint: TacOnShowHint;  

Description
The OnShowHint event occurs when application is about to show the hint. You can write this event handler if you would like to disallow hints for some controls at run-time (see AllowShowHint parameter). The control for which we should display the hint passed with HintControl parameter.  
 
new! Now you can select the style of hint dynamically using ShowStandardHint parameter. Following example demonstrates how to select cartoon-style hints only for TImages and standard style for other controls.  

Example
procedure TForm1.acFormHints1ShowHint(Sender: TObject;  
  HintControl: TControl; Hint: Stringvar AllowShowHint,  
  ShowStandardHint: Boolean);  
begin  
  ShowStandardHint := not (HintControl is TImage);  
end;