Enable
Help menu items
The Help menu has three items, but only one, Help>About, is
enabled. Now you enable the other menu items, using commented-out code
that was provided by the Template Application wizard and the
pbtutor.chm file in the Tutorial directory.
You call application Help topics with the ShowHelp function,
passing it an enumerated value that identifies whether you want the Help
contents or index to display, or a specific topic or keyword. ShowHelp
can open Windows Help or compiled HTML Help (CHM) files.
-
Click the Help menu in the WYSIWYG view and then double-click
the Help Index menu item.You can double-click the Help Index item even though it is not
currently enabled. The full name of the Help Index menu item,
m_help.m_helpindex, displays in the Script view. It includes the
m_help prefix to indicate that it is in the Help menu. -
Select Clicked in the second drop-down box if it is not
already selected. -
Position the cursor in the line that contains the ShowHelp
function and click the Uncomment button in the PowerBar.Change myapp.hlp to pbtutor.chm:
1ShowHelp ("pbtutor.chm", Index!)This displays the default topic in the Help file.
-
Select the Enabled check box on the General page of the
Properties view for the m_helpindex menu item. -
Repeat the preceding steps for the Search For Help On menu
item using the following Show Help function.1ShowHelp ("pbtutor.chm", Keyword!, "")If the third argument contained a string that was a keyword in
the Help file, the associated topic would display. Because the
argument is an empty string, the Help Search window displays. -
Select File>Save from the main PowerBuilder menu
bar.Select File>Close from the main PowerBuilder menu
bar.