2.378 .toolhelp

When this attribute is set, a small pop-up with the specified text is displayed as soon as the mouse pointer rests on the respective object without motion. The pop-up is hidden automatically after a certain time interval or after the mouse pointer has been moved.

The pop-ups may be used to show a short explanation for an object.

Definition

  • Data type

    object [ text ]

  • Access

    get, set

  • changed event

    yes

Support of attribute by objects

Example

child pushbutton PbOK
{
  .text      "OK";
  .toolhelp  "accepts file";
}

Notes on the IDM for Motif

Notes on the IDM for Windows

WM_MOUSEMOVE events that are provoked from another application can interrupt the showing and hiding of the toolhelp. For instance, .toolhelp may open after its change, although the mouse was not moved. It may also happen that a visible toolhelp may not be hidden again or a toolhelp may not be shown at all.

An application-driven display of toolhelps is not intended. If this is desired, the function DM_GetToolkitData() can be used to query the attribute AT_toolhelp of the setup object to get the Windows handle of the tooltip control that the ISA Dialog Manager uses for display.

The toolhelp can be opened with the following example code:

#include <windows.h>
#include <commctrl.h>
#include IDMuser.h
 
void DML_default DM_ENTRY OpenToolhelp __0() {
  DM_ID idSetup = DM_ParsePath(
    (DM_ID) 0, (DM_ID) 0, "setup", 0, 0);
 
  if (idSetup != (DM_ID) 0) {
    HWND hwndToolhelp = (HWND) DM_GetToolkitData(
      idSetup, AT_toolhelp);
 
    if (hwndToolhelp != (HWND) 0) {
      SendMessage(hwndToolhelp, TTM_POPUP,
        (WPARAM) 0, (LPARAM) 0);
    }
  }
}

The OpenToolhelp() function must be defined in the dialog respectively. The Windows message TTM_POPUP is available from version 6 of the Common Controls Library (comctl32.dll).