Skip to main content
RSS feed Subscribe to feed


How to Add a Custom Help File

This tutorial explains how to add a new CHM help file, hooking it into the user interface along with the other resources in the Help menu of Spotfire Professional.


When a new help file, custom_help.chm is added to Spotfire in the appropriate way, it will be available from the Help > Additional Help Topicsin the user interface, along with the default help files supplied by TIBCO Spotfire.

Hooking in a custom help in the Help menu

The help, and a particular topic may also be launched from a button in a tool panel or dialog.

Background Information
  • Adding Custom Help Files
    Help documentation can be integrated in Spotfire. First custom help files are registered, then tools can integrate with their own help file.
  • Spotfire SDK\Examples\Extensions\SpotfireDeveloper.CustomToolsExample


    First declare a public resource for the help file using the Package Builder tool in the SDK. It will add the required publicResource elements to the module.xml file in the developers package. The result has the following structure:

        <publicResource name="" relativePath="custom_help\custom_help.chm" />
        <publicResource name="" culture="de-DE" relativePath="custom_help\de-DE\custom_help.chm" />
        <publicResource name="" culture="en-US" relativePath="custom_help\en-US\custom_help.chm" />

    Registering the Help Resource

    Then register the help resource with the Help Registry when the package is initialized. This is made by overriding the AddIn.RegisterHelp method.

    string fullPath = modulesService.GetResourcePath("");
    protected override void RegisterHelp(HelpRegistrar registrar)
        registrar.Register(Resources.HelpMenuText, "", "10000");

    The resource shows up on the Help menu, under Additional Help Topics. When clicked on, the specified topic id will be shown, in this case 10000.

    Launching the Custom Help from a Tool

    When the user clicks on the Help button in a panel or dialog, he wants the custom help dialog displayed. To get the path to the help file, a call to ModulesService is made. It will resolve the specified resource name based on the calling threads UI culture.

        this, /*Windows Form Control*/

    This will show the help for topic id 20347. The help file shown is custom_help\de-DE\ if the calling threads UI culture is de-DE; otherwise the help is taken from the file custom_help\