HLP (help-id)

Top  Previous  Next

 

HLP(helpID)

HLP

Specifies the helpID for the APPLICATION, WINDOW, or control.

helpID

A string constant specifying the key used to access the Help system. This may be either a Help keyword or a "context string."

The HLP attribute (PROP:HLP) specifies the helpID for the APPLICATION or WINDOW.

The Help file is specified using the HELP function.

The Clarion runtime library uses the helpID of the active menu, control or window, searching up the hierarchy until an object with the helpID is found. The helpID of the APPLICATION is at the top of the hierarchy.

If the user presses the F1 key to request help when the APPLICATION window is foremost and no menus are active, the APPLICATION's helpID is used to locate the Help text.

 

The helpID may contain either a Help keyword/topic or a "context string."

A Help keyword is a word or phrase displayed in the Help Search dialog. When the user presses the F1 key, if only one topic in the help file specifies this keyword, the help file is opened at that topic; if more than one topic specifies the keyword, the search dialog is opened for the user.

A "context string" is identified by a leading tilde (~) in the helpID, followed by a unique identifier (no spaces allowed) associated with a help topic. When the user presses the F1 key, the help file is opened at the specific help topic with that "topic name" If the tilde is absent, the helpID is assumed to be a help keyword.

 When using HTML help (*.chm) the context string should specify either an html page or both the page and a named anchor within that html page. When specifying an html page the context string must include the extension, as in myHelp, to specify page and anchor the syntax is

 myHelp#theNamedAnchor.

Examples:

!using HTML Help

!using HTMLHelp (CHM)

MainWin APPLICATION('My Application'),SYSTEM,MAX,ICON('MyIcon.ICO'),STATUS,HLP('~App')

        MENUBAR

         MENU('&File'),USE(?FileMenu)

          ITEM('&Open...'),USE(?OpenFile),HLP('~Help_with_OpenFile')

         END

        END

       END

 

!A Window with a help keyword:

Win2 WINDOW,HLP('Window One Help')

     ENTRY(@s30),USE(AccountNumber),HLP('Accounts') !open specific page in help

 ENTRY(@s30),USE(AccountName),HLP('Accounts#AccountName')

 !open specific page in help and position to an html named anchor "AccountName"

    END

 

!using WinHelp (.Hlp)

MainWin APPLICATION('My Application'),SYSTEM,MAX,ICON('MyIcon.ICO'),STATUS,HLP('~App')

        MENUBAR

         MENU('&File'),USE(?FileMenu)

          ITEM('&Open...'),USE(?OpenFile),HLP('~OpenFileHelp')

         END

        END

       END

 

!A Window with a help keyword:

Win2 WINDOW,HLP('Window One Help')

     ENTRY(@s30),USE(SomeVariable2),HLP('Control Two Help') ! open search for help keyword

    END

 

 

See also:

HELP