2006. január 5., csütörtök

Bring up Help Context for particular control


Problem/Question/Abstract:

This procedure will bring up a popup defined in a help file, it uses the HelpContext value of the control.  You will have to enter for each field the context ID number from the .hh file

Answer:

procedure TForm1.BringUpHelpContext(Sender: TObject);
var
  HelpCon: THelpContext;
begin
  if Sender is TWinControl then
    HelpCon := TWinControl(Sender as TWinControl).HelpContext;
  Application.HelpCommand(HELP_CONTEXTPOPUP, HelpCon);
end;

Sample usage:

BringUpHelpContext(Sender);

Nincsenek megjegyzések:

Megjegyzés küldése