tooltips logo soft ware for the masses
soft ware for the masses
screenshots

Custom Tooltips

In a normal situation when an object requires a tooltip it usually provides whether its Window Handle or Command ID. Using one of such attributes we can attach a tooltip to the object. When none of such attributes are available or when we need to show different tooltips for different parts of the object we cannot attach the tooltips directly.

Interface IVXPTooltipManager of the VXPLib component implements a means of automation in attaching tooltips to any object on the screen without having access to the object's Window Handle or Command ID. And it uses a universal and very straightforward way of doing it.
The example below shows how that technique can be used for implementing tooltips for two types of elements: items of a tree control and items of a list control.
Main Shot

For each individual item of the tree control a tooltip is shown containing the item's name and handle in hex:
Tooltip on tree items

When the mouse cursor is outside any tree item but within the tree control a general tooltip is shown.
Tooltip on tree control

For each item in the list control we can see a tooltip with the item's contents and name of the column that contains the item:
Tooltip on list items

When the mouse cursor is outside any list item but within the list control a general tooltip is shown to indicate that:
Tooltip on list control

For each column we can see a different tooltip that contains the column's title:
Tooltip on list columns

If we switch ON the only option on the dialog box we tell the program to show the same tooltip for all columns. Since the list header is a control that exposes its Window Handle such tooltip is attached directly to it, not as a custom one:
Tooltip on the entire list header