formhelp OnShow event
Return to Introduction  Previous page  Next page
Applies to
acFormHelp component.  

Declaration
type  
  TacFormHelpOnShowEvent = procedure(Sender: TObject; HelpControl: TControl; var HelpMessage: stringof object;  
 
property OnShow: TacFormHelpOnShowEvent;  

Description
The OnShow event occurs before appearing of the popup window with context-sensitive help. Write the OnShow event handler to make some special processing before the help window became visible on screen.  
 
Use HelpControl parameter to get pointer to control from wich with the context-sensitive help was taken.  
 
Use HelpMessage parameter to determinate or change the text of context-sensitive help which is about to be displayed.  

Example
procedure TForm1.FormHelpShow(Sender: TObject; HelpControl: TControl; var HelpMessage: string);  
begin  
  if HelpControl.Name = 'Edit2' then  
   begin  
    FormHelp.DelayTime := 2000// Two seconds delay  
    FormHelp.Color := $00FFFFEC;  
    FormHelp.Font.Name := 'Arial';  
    FormHelp.Font.Size := 8;  
   end;  
  if HelpMessage = '.' then HelpMessage := 'Hello World!';  
end;  

See also
OnHide event.