Search Locate Previous Next Contents

Linking to a Help File

This is quite simple to do, once you have made the help file in the first place! You can go in at the top level (the main contents page) with a simple utility such as #.Win.Help (in the Causeway workspace):


Win.Help '\apl\causeway\causeway.hlp'
6130000 Win.Help '\apl\causeway\Causeway'
'Geometry' Win.Help '\apl\causeway\Causeway'

... the second example goes in using a ‘context number’ to the help page for the Causeway FM class – I happen to know that the help numbers are computed from their class mnemonic in this way! Finally, you can use a keyword to get to a list of all the topics where the keyword occurs; this will go straight to the topic if the keyword has only one hit in the file.

Typically you would add a <Help> button to your dialogue definition, and use a call to Win.Help passing a context number on the left to go directly to the correct topic. You will also find that many text-editing classes offer a ‘Help Request’ event which is triggered for the field when the user presses <F1> in the field. This allows you to give field-level help if you really need this level of detail – in practice it may be better to use the field ‘Hint’ and ‘Tip’ properties here.

To add <F1> help to a form without cluttering it with an extra <Help> button, you could add a ‘Hidden’ control, set its Accelerator property to F1 and simply call Win.Help from its normal Select event with the appropriate number.

N.B. (Windows 95 users only) – if the help file has been compiled with the new ‘tree of books’ style of interface you should call #.Win.Help with ¯1 on the left to access the contents page.


Continue to: Running it for Real
© Copyright Causeway Graphical Systems Ltd 2001