ComponentOne Menus and Toolbars for WinForms
Menus and Toolbars for WinForms Task-Based Help / Menu Tasks / Displaying ToolTips for Menus and Toolbars
In This Topic
    Displaying ToolTips for Menus and Toolbars
    In This Topic

    This topic demonstrates how to customize the ToolTips by creating your own ToolTips for menus and toolbars. Both the menus and toolbars have the property called ToolTipText that provides users the ability to display ToolTips when the user mouses over a menu or a toolbar.

    Displaying ToolTips for Menu Items

    1. Right-click on the top level menu (C1CommandMenu) in the main menu and select Properties from its context menu.
    2. Select C1CommandMenu1 from the Properties drop-down list and expand the Command node.
    3. Set the ShowToolTips property to True to enable the text to appear when the user mouses over the menus.
    4. On the form, select a C1Command menu item that you want to display ToolTips. Set the ShowTextAsToolTip to False so that the command's text will not appear for the selected menu item in the C1CommandMenu when the user mouses over the menus.
    5. Select the ToolTipText property and enter the information in the textbox that you want to appear when the user mouses over the menu item.
    6. Save and run your application. Below is what the ToolTipText will look like at run time:
      Form

    Displaying ToolTips for Buttons on the Toolbar

    1. Select the toolbar button from the C1ToolBar control on your form.
    2. The command link's properties for the C1ToolBar appear in the Properties Toolbox on the right-pane. Locate the C1CommandLinks properties and expand the Command properties.
    3. Set the ShowTextAsToolTip to False.
    4. Select the ToolTipText property and enter the information in the textbox that you want to appear when the user mouses over the toolbar button.
    5. Save and run your application. Here is what the ToolTip text will look like for the toolbar button when you mouse over the volcano:

      Tooltip text

      Note: If you leave the ShowTextAsToolTip property to its default value, True, then the toolbar button's text will be displayed when the user mouses over the toolbar button rather than the ToolTip's text. Also, delete the information that you entered for the ToolTipText property in the toolbox. The toolbar appears like the following image:

      Toolbar

    Displaying ToolTips Text for Buttons on the Outbar

    You can follow the same procedure listed above to display ToolTips for buttons on the outbar.

    See Also