Following on from our previous post on the new TOOLTIP property, this time we’re going to look at the new tooltip functionality added to Listbox controls, namely tracking and in-place item tooltips.
Tracking tooltips are small popup windows that appear when a user hovers over a partially obscured item in the control: they display the full item text string instead, and thereby avoid the need for horizontal scrolling, which is always a preferable user experience.
In-place tooltips operate in a similar manner, but rather than appearing at an offset to the cursor position they actually appear over the item itself, hence the term “in-place”:
This behaviour is controlled by the new SHOWITEMTOOLTIPS property which can be set to one of the following values:
"0" - Disabled : Item tooltips are not displayed "1" - Offset : Item tooltips are displayed at an offset to the cursor "2" - In-place : Item tooltips are displayed over the item itself.
When set to “1” (Offset) or “2” (In-place) the SHOWITEMTOOLTIPS property overrides the normal TOOLTIP property, so a “normal” tooltip will not be displayed.
Sometimes it is desirable to display a different text string in the tooltip rather than the item text itself. In this case you can set the new SHOWVALUESASTOOLTIPS property to specify that the tooltip should display the contents of the item’s VALUE property instead.
SHOWVALUESASTOOLTIPS is a simple boolean property of TRUE$ or FALSE$.
Note in this case the tooltip is always displayed at an offset, and is triggered regardess of whether or not the item is clipped.
Both new properties described here also apply to simple Combobox and TreeListbox controls.
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).