In this article:

Description

Example

Replacing Help for System Dialog Boxes

Example

Using User Help

Article number: KB000025

Description

Working with Foresight Analytics Platform help system in the WinApplication class is implemented via the Help property. This property returns an object that is used to manage help. The FileName property determines path and name of the help file to be called. By default, this property contains path to the Studio.chm file. This file is installed automatically with Foresight Analytics Platform.

All the components located on the form must have the HelpContext property set. To open the help in application forms, set a handler of the OnHelp event that occurs on the F1 or ? button click when some component is focused. In this event by using the ContextId property, it is available to get index of help section (value of the HelpContext property), related with the focused component. By passing this value to the Context method it opens the corresponding help sections.

Example

Executing the example requires a form and some components located on the form. Unique values of the HelpContext property are set for all components. This procedure is set to handle the OnHelp event of the form. The application folder must have the Help.chm file that has a configured identifier map.

Sub FormOnHelp(Sender: Object; Args: IHelpEventArgs);
Var
    Help: IWinApplicationHelp;
Begin
    Help := WinApplication.Help;
    Help.Context(Args.ContextId, "Help.chm");
End Sub FormOnHelp;

Selecting a component and pressing the F1 key opens the Help.chm help file. The appropriate help section is searched by the value of identifier of the help section set for the particular component.

Replacing Help for System Dialog Boxes

When using system platform dialog boxes (such as a dialog box with parameters of repository object access control or a dialog box that is used to set up express report title, and so on), sometimes you need to replace system help with user help. F1 key click events for such dialog boxes are implemented in the kernel. Connection with the help is implemented by keywords (for example, for login dialog box - CUiDlgLogin).

NOTE. To get keywords for required dialog boxes, contact technical support support@fsight.ru or use technical support services, which are available after registration at the website.

To open user help, set path to the user help file FileName. The file should contain keywords added for appropriate sections that are used in the platform kernel.

To force open the help, it is possible to use the ALinkLookup method by specifying the corresponding keyword and user help file.

Example

Executing the example requires a form and a button named with the Button1 identifier on the form.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    WinApplication.Help.ALinkLookup("CUiDlgLogin");
End Sub Button1OnClick;

Clicking the button opens help on working with login dialog box.

NOTE. For details on creating an identifier map (Map ID), keywords (Keyword Link, ALink) and index keywords (Index Keyword, KLink) see in the guides on creating help systems for particular software products.

See also:

Developers Knowledge Base