This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




tooltip(n)                                   Tooltip management                                   tooltip(n)



____________________________________________________________________________________________________________

NAME
       tooltip - Tooltip management

SYNOPSIS
       package require Tcl  8.4

       package require msgcat  1.3

       package require tooltip  ?1.4?

       ::tooltip::tooltip command ?options?

       ::tooltip::tooltip pathName ?option arg? message

____________________________________________________________________________________________________________

DESCRIPTION
       This  package provides tooltips, small text messages that can be displayed when the mouse hovers over
       a widget, menu item, canvas item, listbox item or text widget tag.

COMMANDS
       ::tooltip::tooltip command ?options?
              Manage the tooltip package using the following subcommands.

              clear index
                     Prevents the specified widgets from showing tooltips. pattern is  a  glob  pattern  and
                     defaults to matching all widgets.

              delay ?millisecs?
                     Query  or  set  the hover delay. This is the interval that the pointer must remain over
                     the widget before the tooltip is displayed. The delay is specified in milliseconds  and
                     must be greater than 50ms.  With no argument the current delay is returned.

              fade ?boolean?
                     Enable  or disable fading of the tooltip.  The is enabled by default on Win32 and Aqua.
                     The tooltip will fade away on Leave events instead disappearing.

              disable

              off    Disable all tooltips

              enable

              on     Enables tooltips for defined widgets.


       ::tooltip::tooltip pathName ?option arg? message
              This command arranges for widget pathName to display a  tooltip  with  message  message.   The
              tooltip  uses a late-binding msgcat call on the passed in message to allow for on-the-fly lan-guage language
              guage changes in an application.  If the widget specified is a menu,  canvas  or  text  widget
              then  additional options are used to tie the tooltip to specific menu entries, canvas items or
              text tags.

              -index index
                     This option is used to set a tooltip on a menu item. The index may be either the  entry
                     index  or the entry label. The widget must be a menu widget but the entries do not have
                     to exists when the tooltip is set.

              -item name
                     This option is used to set a tooltip for a canvas widget item or a  listbox  item.  For
                     the  canvas  widget, the item must already be present in the canvas widget. For listbox
                     widgets the item may be created later but the programmer is  responsible  for  managing
                     the  link  between the listbox item index and the corresponding tooltip. If the listbox
                     items are re-ordered, the tooltips will need ammending.

                     If the widget is not a canvas or listbox then an error is raised.

              -tag name
                     The -tag option can be used to set a tooltip for a text  widget  tag.  The  tag  should
                     already be present when this command is called or an error will be returned. The widget
                     must also be a text widget.


EXAMPLE
       # Demonstrate widget tooltip
       package require tooltip
       pack [label .l -text "label"]
       tooltip::tooltip .l "This is a label widget"


       # Demonstrate menu tooltip
       package require tooltip
       tooltip::tooltip .menu.test -index 0 "This is a menu tooltip"


       # Demonstrate canvas item tooltip
       package require tooltip
       pack [canvas .c]
       set item [.c create rectangle 10 10 80 80]
       tooltip::tooltip .c -item $item "Canvas item tooltip"


       # Demonstrate listbox item tooltip
       package require tooltip
       pack [listbox .lb]
       tooltip::tooltip .lb -item 0 "Listbox item tooltip"


       # Demonstrate text tag tooltip
       package require tooltip
       pack [text .txt]
       tooltip::tooltip .txt -tag TIP-1 "tooltip one text"


KEYWORDS
       balloon, help, hover, tooltip

COPYRIGHT
       Copyright (c) 1996-2007, Jeffrey Hobbs




tooltip                                              1.4                                          tooltip(n)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...