Gadgets > Rogue Wave Views Gadgets > Understanding Gadgets > Common Gadget Properties > Setting Tooltips
 
Setting Tooltips
Gadgets can be associated with a tooltip. A tooltip is short explanatory text that is displayed when the user places the mouse pointer over a gadget. By default, tooltips are supported by the gadget holders. If you want to use tooltips outside gadget holders, use the class IlvToolTipHandler.
This section covers the following topics:
*Creating a Tooltip
*Attaching a Tooltip to a Gadget
*Enabling and Disabling Tooltips
*Specific Tooltips
Creating a Tooltip
A tooltip is an instance of the IlvToolTip class. To create a tooltip, call:
IlvToolTip* tooltip = new IlvToolTip(“This is a test”);
Attaching a Tooltip to a Gadget
You can attach a tooltip to a gadget with the member function IlvGraphic::setNamedProperty since IlvToolTip is a subclass of the IlvNamedProperty class:
gadget->setNamedProperty(new IlvTooltip(“This is a test”));
Enabling and Disabling Tooltips
You can enable or disable tooltip management at the application level using the static member function Enable.
Specific Tooltips
Some gadgets have their own tooltip mechanism, including IlvToolBar, IlvTreeGadget, IlvMatrix, IlvStringList, and IlvPopupMenu.
For more information, refer to the sections dedicated to these gadgets.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.