Custom Help Files

The PowerBASIC IDE has built-in context-sensitive help for PowerBASIC keywords.  If the caret is placed on a keyword when you invoke help, you will get help for that specific keyword.  Now, you can add context-sensitive help for your own help files.  Here's how.

For each help file, create a text file with a name of your choice, with a file extension of .PBKeys (using the PowerBASIC IDE, NotePad, or any other text editor).  The first line of the text file must contain the name of the help file, as it will be shown in the IDE's help menu, like so:

MenuName="PowerTree 1.1"

The next line of the PBKeys file specifies the name and location of the help file.  If the help file is in the same directory as the .PBKeys file, you can specify just the filename, without the path.  Otherwise, you must provide a fully-qualified absolute path:

HelpFile="C:\PTreeW11\PwrTree.hlp"

Each following line specifies a help keyword.  This keyword must be present in the index of the help file, in order for context-sensitive help to work.

HelpKey="AccessBlock"

HelpKey="ptCreateIndex"

HelpKey="ptAdd"

…and so forth.

When you're done, save the .PBKeys file in the Bin subdirectory for your compiler.  The default location for this is, typically, "C:\PBCC40\Bin\".  Now, the next time you start the PowerBASIC IDE, your custom keywords will be recognized by the context-sensitive help system.  You will also be able to load the help file from the Help menu.

If your help file does not appear in the Help menu when you start the IDE, make sure the HelpFile line of the .PBKeys file specifies the correct location and name for your help file.

The complete PowerTree .PBKeys file, "PowerTree 1.1.PBKeys", is already installed in your compiler's Bin subdirectory.  Please note that the custom help list is only loaded if you have PowerTree 1.1, and it's installed at the location specified in the HelpFile line of the PBKeys file.

 

See Also

The Integrated Development Environment