Progress
Help Development
Guide


Implementing Context-sensitive Help with the Progress 4GL

In the Progress 4GL, when the user clicks on the question mark icon to initiate a context-sensitive help operation, the following occurs:

Context-sensitive help supports the following attributes, statements, and phrases:

CONTEXT-HELP Attribute

The CONTEXT-HELP attribute applies to window and dialog box widgets. It is a logical value. When CONTEXT-HELP is TRUE, a question mark icon displays in the title bar of the window or dialog box. CONTEXT-HELP is both readable and writable; however, it must be set before the window or dialog box is realized. The default value of CONTEXT-HELP is FALSE.

Microsoft Windows does not permit the question mark icon to appear, or it appears but does not function, when combined with these other attribute settings that affect a window’s title bar:

To summarize, you must set CONTEXT-HELP = TRUE, MIN-BUTTON = FALSE, and MAX-BUTTON = FALSE (leaving CONTROL-BOX and SMALL-TITLE at their default FALSE values) to successfully use this feature with a window widget.

NOTE: The preceding settings only apply to window widgets, not to dialog boxes. The question mark icon always functions correctly when used with a dialog box.

CONTEXT-HELP-FILE Attribute

The CONTEXT-HELP-FILE attribute specifies the path of a help file (.hlp) associated with a dialog box, window, or session. (The full path of the help file is required; Progress does not search for the help file.) This attribute is a character value and is readable and writable. It applies to the dialog box widget, window widget, and SESSION handle.

If the CONTEXT-HELP-FILE is not specified (is UNKNOWN) for a dialog box, the dialog box inherits the help file of its parent window. If the parent window’s CONTEXT-HELP-FILE is also UNKNOWN, it inherits the session’s help file (specified by SESSION:CONTEXT-HELP- FILE).

CONTEXT-HELP-ID Attribute

The CONTEXT-HELP-ID attribute specifies the context ID of a help topic in a help file. It is an integer value and is readable and writable. It applies to the following widgets:browse, button, combo-box, control frame, editor, fill-in, radio-set, selection-list, slider, and toggle box.

DEFINE BROWSE Statement

When the CONTEXT-HELP-ID attribute is used with the DEFINE BROWSE statement, it specifies the context ID of a help topic for this browse. The help file is specified at the session, window, or dialog box level using the CONTEXT-HELP-FILE attribute. The syntax for the DEFINE BROWSE statement follows:

SYNTAX
DEFINE [ [ NEW ] SHARED ] BROWSE browse-name
.
.
.
[ CONTEXT-HELP-ID expression ]
.
.
.  

DEFINE BUTTON Statement

When the CONTEXT-HELP-ID attribute is used with the DEFINE BUTTON statement it specifies the context ID of a help topic for this button. The help file is specified at the session, window, or dialog box level using the CONTEXT-HELP-FILE attribute. The syntax for the DEFINE BUTTON statement follows:

SYNTAX
DEFINE BUTTON button
.
.
.
[ CONTEXT-HELP-ID expression ]
.
.
. 

DEFINE VARIABLE Statement

When the CONTEXT-HELP-ID attribute is used with the DEFINE VARIABLE statement, it specifies the context ID of a help topic for this variable. The help file is specified at the session, window, or dialog box level using the CONTEXT-HELP-FILE attribute. The syntax for the DEFINE VARIABLE statement follows:

SYNTAX
DEFINE [ [ NEW [ GLOBAL ] ] SHARED ] VARIABLE variable
.
.
. 
[ CONTEXT-HELP-ID expression ]
.
.
. 

Frame Phrase

When the CONTEXT-HELP attribute of the Frame Phrase is used with the DEFINE FRAME and FORM statements, among others, it specifies that context-sensitive help is available for that frame.

When the CONTEXT-HELP-FILE attribute of the Frame Phrase is used with the DEFINE FRAME and FORM statements, among others, it specifies the complete path of a help file associated with that frame. If CONTEXT-HELP-FILE is specified without CONTEXT-HELP, CONTEXT-HELP is assumed. This behavior can be overridden by setting the dialog box’s CONTEXT-HELP attribute to FALSE at run time. The syntax for the Frame Phrase follows:

SYNTAX
WITH 
.
.
.
[ CONTEXT-HELP ] [ CONTEXT-HELP-FILE help-file-name ] 
.
.
. 

Example

The following example displays a dialog box with two fill-ins and two buttons. It demonstrates several ways help can be accessed:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095