\HeaderA{tk2tip}{Display and manage tooltips in tk widgets}{tk2tip}
\aliasA{tk2killtip}{tk2tip}{tk2killtip}
\keyword{utilities}{tk2tip}
\begin{Description}\relax
\code{tk2tip} provides a simple mechanism to display tooltips on tk widgets when
the mouse hoover on top of them.
\end{Description}
\begin{Usage}
\begin{verbatim}
  tk2tip(widget, message)
  tk2killtip()
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{widget}] The widget to which a tooltip is attached 
\item[\code{message}] The message of the tooltip ("" to remove the tooltip) 
\end{ldescription}
\end{Arguments}
\begin{Note}\relax
This implementation is done in pure tcl code
\end{Note}
\begin{Author}\relax
Philippe Grosjean
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{tk2widgets}{tk2widgets}}, \code{\LinkA{tk2theme}{tk2theme}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  ## Not run: 
    ## These cannot be run by examples() but should be OK when pasted
    ## into an interactive R session with the tcltk package loaded

        tt2 <- tktoplevel()
    lb <- tk2label(tt2, text = "Move mouse over me, or over the button to see tooltip")
    tkgrid(lb)
    tk2tip(lb, "A tooltip for the label \ndisplayed on two lines")
    but <- tk2button(tt2, text = "OK", width = 10,
        command = function() tkdestroy(tt2))
    tkgrid(but)
    tk2tip(but, "Another tooltip for the button")
    #### TO DO: show the use of tk2killtip()!
  ## End(Not run)
\end{ExampleCode}
\end{Examples}

