|« Main Page | Index|
The Tooltips Object
Tooltips are the little text strings that pop up when you leave your pointer over a button or other widget for a few seconds. They are easy to use, so I will just explain them without giving an example. Widgets that do not receive events (widgets that do not have their own window) will not work with tooltips.
You only need to construct one Tooltip object for a set of tooltips because it can be used to create multiple tooltips:
Once you have created a new tooltip, and the widget you wish to use it on, simply use this call to set it:
The 'widget' argument is the widget you wish to have this tooltip pop up for. The 'tip_text' argument is the text you want the tooltip to display. The 'tip_private' argument is a text string that can be used to implement context sensitive help. For now, it is not enabled in GTK so you can just ignore it.
Here's a short example:
There are other calls that can be used with tooltips. I will just list them with a brief description of what they do.
Enable a disabled set of tooltips.
Disable an enabled set of tooltips.
Returns true if a set of tooltips is enabled.
Unset a previously set tooltip. And that's all the functions associated with tooltips. More than you'll ever want to know.