Part 6. Adding Help Text to User Interface Controls

You can easily add two kinds of help text to a user interface control that supports such help, by entering that text in appropriate fields of the control's Settings dialog. Both kinds of help are displayed when the user passes the mouse pointer over the control for which the help is provided. The two kinds of help are:

If you want, you can enable only one or the other, or both.

This section of the tutorial is optional, but will probably take you only 10 minutes.

Enabling the Fly-Over Help

Before you add the text of this help, you need to enable the two types of help. You already added an IInfoArea object to your user interface part when you created the part in the Parts SmartGuide. The remaining tasks you need to complete to enable hover help are to add an IVBFlyText object, and to connect the IInfoArea object to the IVBFlyText object. Once these objects are properly set up, you will add the help text to each control.

  1. Click the Other parts category from the left column of the Parts palette.
  2. Click the IVBFlyText* part from the right column of the Parts palette.
  3. Click an area of the composition editor workspace outside the FrameWindow object. An IVBFlyText* object appears on the workspace.

    Hover help for short text help is now enabled.
  4. Click the InfoArea1 object at the bottom of the frame window.
  5. Click mouse-button 1. 
  6. Select Connect.
  7. From the cascading menu select this (note that this appears at the bottom of the cascading menu. Do not select this*, which appears at the top).
  8. Move the star-shaped icon over the IVBFlyText object and click mouse button 1.
  9. From the menu select longTextControl.

Both long and short hover help are now enabled.

Add Help to Each Push Button

This section describes the steps for adding short and long hover help text to the Edit push button. The long version appears in the info area at the bottom of the window, while the short version appears over the object itself. Follow these steps to add help text to the Edit push button:

  1. In the Composition Editor, click mouse button 2 over the Edit button and select Open Settings from the pop-up menu.
  2. In the list of properties, which is sorted alphabetically, locate Fly-over long text.
  3. Enter the following text in the entry field to the right of Fly-over long text:
    Copy the entry selected in the list to the editable fields
  4. Enter the following text in the entry field to the right of Fly-over short text:
    Copy entry to edit fields
  5. Press Enter or click OK to close the Properties dialog.

You can follow these same steps to add hover help to the other buttons, if you like. Here is the text to add:

Button Long Text Short Text
Delete Delete the user whose name is selected in the list Delete selected user from list
<< Add Add the user information at right to the list Add to list of users
<<Save Save the changed user's information to the list Save edited user

If you want, you can save the part (press Ctrl+G), then switch to the IDE, rebuild the project, and try running the application. When you move the mouse over one of these push buttons, you should see a short bubble of hover help text near the button, and a longer text string in the information area at the bottom of the window.

You can proceed to: