< Previous PageNext Page > Hide TOC

Tooltips

A tooltip is a bit of text that provides information about a view. If the user holds the cursor over the view for more than the default delay, the tooltip text is displayed in a small framed rectangle next to the cursor. By default, a view does not display a tooltip. To turn on tooltip display for a view, you invoke the setToolTip: method to install tooltip text for the view. To turn display off, you invoke setToolTip: with an empty string.

See Providing Help Tags in Carbon for guidance in writing tooltips.

If you do not want the tool tip to be displayed for the entire view, you can create one or more tool tips that apply to only sections of the view. The tool tip text also can be either static or determined when the tool tip is displayed. To create a tool tip for only a section of the view, you invoke addToolTipRect:owner:userData: with a rectangle identifying the tool tip area and an object, the owner, that can later provide the tool tip text. To remove individual tool tips created with this method, you invoke removeToolTip: with a tag identifying the tool tip. To remove all tool tips assigned to the view, you invoke removeAllToolTips.



< Previous PageNext Page > Hide TOC


© 2003, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-06-28)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.