Click or drag to resize

HelpDisplay Class

X#
Create a link to the help system in use.
Inheritance Hierarchy
Object
  VObject
    HelpDisplay

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 CLASS HelpDisplay INHERIT VObject
Request Example View Source

The HelpDisplay type exposes the following members.

Constructors
  NameDescription
Public methodHelpDisplay
Construct a help display to be used for a specified help database.
Top
Methods
  NameDescription
Public methodHelpError
Determine if the previous HelpDisplay operation was successful.
Public methodShow
Instruct the help system to provide the help topic associated with a given keyword.
Top
Fields
  NameDescription
Public fieldDefaultPageOnContents
Public fieldoCargo
Cargo slot.
(Inherited from VObject.)
Public fieldWin32Processing
Top
Remarks
The HelpDisplay class allows you to easily provide online help for your applications. The help system resource provided by the GUI can remain in memory until the HelpDisplay object is deleted. Therefore, before the application terminates, ensure that the HelpDisplay object is either deleted or goes out of scope. HelpDisplay provides a way to display help on a given topic. However, the application still needs a means of determining which topic help is required. For large applications, most GUI style guides recommend that help commands be made available from the menu bar. These commands can be trapped using the MenuCommandEvent handler, and the appropriate help information displayed in response. Another approach is to use push buttons to obtain help on specific topics. Using a push button and the ButtonClick() event handler, you can program the application to display the relevant help information when the Help button is pressed. In practice, an application's Help facility should combine menu commands and buttons to provide help. Context-sensitive help means the user receives help specific to the current activity when the help key or mouse sequence is chosen. For example, when responding to a dialog window, the user can want help for the control with the focus. X# applications can provide context-sensitive help for: Particular areas of the screen (such as the caption bar and canvas area) Menu commands Controls (like push buttons, edit controls, and toolbar buttons) To support a portable context-sensitive help system, X# provides the HelpRequestEvent class, the Window:HelpDisplay property, and the Window:HelpRequest() event handler method. (HelpRequest() determines the source of the help trigger—that is, the particular item for which help is requested—and passes this information on to the GUI's help system.) Refer to the "GUI Classes" chapter in the Programmer's Guide for more information on programming an online help system for your application.
Tip Tip
The EXPORTed variable DefaultPageOnContents is a LOGIC which defaults to TRUE. It is used to determine whether the default page should be shown when HelpContents is requested. If set to FALSE, 'HelpContents' will display the Contents tab but leave the current topic displayed. For HTML Help only.
Examples
The following example handles two common menu commands, Help Index and Help Using Help:
X#
 1CLASS MyWindow INHERIT TopAppWindow
 2METHOD Init() CLASS MyWindow
 3SUPER:Init()
 4SELF:HelpDisplay := HelpDisplay{"mywind.hlp"}
 5METHOD MenuCommand(oMCE) CLASS MyWindow
 6LOCAL nItemID := oMCE:ItemID
 7DO CASE
 8CASE nItemID = IDM_MENU_HELP_INDEX_ID
 9SELF:HelpDisplay:Show("HelpIndex")
10CASE nItemID = IDM_MENU_HELP_USINGHELP_ID
11SELF:HelpDisplay:Show("HelpOnHelp")
12OTHERWISE
13SUPER:MenuCommand(oMCE)
14ENDCASE
See Also

Reference