Showing Help with Help Buttons

From RAD Studio
Jump to: navigation, search

Go Up to Calling HTML Help from Applications


You can use the Help button, of type Vcl.Buttons.TBitBtn and with the Kind = bkHelp kind, to show the help topic without writing any code.

In the Form Designer, select your form. On the Tool Palette, select Additional. Select TBitBtn. Place the TBitBtn type button on your form. The Object Inspector shows the properties of this button as in the following figure:

Help_Bit_Button

In the right column of the Kind property, select bkHelp. The button Caption shows Help.

Build and Run your application. Clicking this Help button in your application opens the help topic identified by the specified context ID number or by the specified keyword.

You can specify the help topic properties for a help button directly using the button properties: HelpType (htContext or htKeyword) and HelpContext or HelpKeyword. However, usually you specify help topic properties in properties of the parent form. To delegate the specification of the help topic properties to the form, set HelpType = htContext and HelpContext = 0 (notice that these are the default values of these properties.)

You specify the help file name in the HelpFile property of the parent form or of the global Application object.

See Also