Pop-up Hints

Bitmap buttons allow you to pack several controls into a small screen area. This makes them particularly useful in the construction of toolbars. However, a toolbar can be a problem for the novice or occasional application user because these users may not remember what functions the buttons perform. Because of their small size, these buttons do not always clearly indicate their purpose.

To aid these users, the run-time supports pop-up hints. A pop-up hint is a piece of text that pops up in its own window when the user places the mouse over a bitmap button for a predefined period of time. The text describes the function of the button. After some time has elapsed, the pop-up window disappears. Under Microsoft Windows, pop-up hints are also called tool tips.

To give a bitmap button a pop-up hint, simply assign the button a title. The title does not appear on the button. Instead, the run-time uses it as the pop-up hint. The hint will pop up automatically whenever the mouse is placed over the button and remains over the button for at least three-quarters of a second. The hint will automatically disappear after about four seconds. The hint will also disappear if you move the mouse away from the button, use the button, or start typing. Once a hint has been shown for a particular button, it will not be redisplayed as long as the mouse remains over that button. This prevents the hint from popping up annoyingly when the user uses the same button repeatedly.

Pop-up hints are displayed in a system-dependent color and font. Under Windows 98, the colors used are chosen by the user in the Control Panel for Tooltips. SMALL-FONT is used to display the hint.

You can control various aspects of how hints work with the HINTS_ON and HINTS_OFF runtime configuration variables.