ComponentOne DynamicHelp for WinForms
DynamicHelp for WinForms Tutorials / Tutorial 2: Mapping Help Topics in Authoring Mode / Step 3 of 4: Using authoring mode
In This Topic
    Step 3 of 4: Using authoring mode
    In This Topic

    This step explains how the Help author can activate authoring mode and associate topics with controls.

    1. Run the application from the software developer and press the Ctrl+Shift+A keys together to activate authoring mode. The authoring mode panel appears.
    2. Map a topic to the TextBox control:
      1. Click Select control button and select TextBox1.
      2. Click the Attach topic to control button . The Select Help Topic dialog box appears.
      3. On the Table of Contents tab, select the Glossary of Terms topic.
      4. Uncheck the Use default events and Mouse hover checkboxes so that only Got focus is checked.
      5. Click OK. Note that a topic is now displayed only when TextBox1 gets focus - not when the mouse hovers over it.
    3. Map a topic to the TreeView nodes:
      1. Click Select control button and select the Overview node.
      2. Click the Attach topic to control button . The Select Help Topic dialog box appears.
      3. On the Table of Contents tab, select the Overview topic and click OK.
      4. Assign the How to use C1DynamicHelp topic to the How to Use node using steps a-c.
      5. Assign the Design time support topic to the Design time node using steps a-c.
      6. Assign the Runtime support topic to the Runtime node using steps a-c. Note that the corresponding topics are displayed when the mouse hovers over each of the TreeView nodes.
        Note: In authoring mode you have the ability to associate topics with objects whose class is not derived from Component, such as TreeNode or ListBox items. This cannot be done at design time, because there is no Component to set for the HelpTopic on C1DynamicHelp1 property.
    4. Click the Save control/topic mappingbutton to save the changes to an .xml file that serves as the topic map.
      Note: If you close the application without saving the control/topic mapping, a dialog box will appear, prompting you to save the changes.

      The topic map is saved to the same location as the Help file specified in the HelpSource property. It will also have the same name as the specified Help file, only with an .xml extension. In this example, the topic map can be found in the C1Sample.chm.xml file. It should now look like this:

      XML code

      <Dictionary>
        <item>
          <key>Form1\textBox1</key>
          <value>WordDocuments/glossaryofterms.htm</value>
          <events useDefaultEvents="False">1</events>
        </item>
        <item>
          <key>Form1\treeView1\Node1</key>
          <value>WordDocuments/howtousec1dynamichelp.htm</value>
          <events useDefaultEvents="True">3</events>
        </item>
        <item>
          <key>Form1\treeView1\Node0</key>
          <value>WordDocuments/overview.htm</value>
          <events useDefaultEvents="True">3</events>
        </item>
        <item>
          <key>Form1\treeView1\Node1\Node2</key>
          <value>WordDocuments/designtimesupport.htm</value>
          <events useDefaultEvents="True">3</events>
        </item>
        <item>
          <key>Form1\treeView1\Node1\Node3</key>
          <value>WordDocuments/runtimesupport.htm</value>
          <events useDefaultEvents="True">3</events>
        </item>
      </Dictionary>
    5. Give the C1Sample.chm.xml file, along with the updated Help file(s), if changed, to the software developer.