Difference between revisions of "Command/tooltip"

From ConTeXt wiki
m (moved Reference/en/tooltip to Command/tooltip: Text replace - "Reference/en/" to "Command/")
m (Text replace - "[[Category:Commands|" to "== ConTeXt-Forum == {{Forum|{{SUBPAGENAME}}}} [[Category:Commands|")
Line 59: Line 59:
 
== See also ==
 
== See also ==
 
<!-- something like [[cmd:goto|\goto]] -->
 
<!-- something like [[cmd:goto|\goto]] -->
 +
 +
== ConTeXt-Forum ==
 +
{{Forum|{{SUBPAGENAME}}}}
  
 
[[Category:Commands|tooltip]]
 
[[Category:Commands|tooltip]]

Revision as of 00:01, 15 March 2012

\tooltip

Syntax

\tooltip[...]{...}{...}
[...] left right middle
{...} text
{...} text


Description

Example

Here is a typical example (this works only with PDF viewers which are JavaScript compatible, such as Adobe Acrobat):

\setuppapersize[S6][S6]
\setupinteraction[state=start]
\setupcolors[state=start]

\starttext
Here is an example: by saying
\type{\tooltip[left]{Example}{Is it nice}}, we get 
\blank
\midaligned{\tooltip[bottom]{Example}{Isn't it nice?}}
\blank

This file when opened in Adobe Acrobat will show the tooltip "Isn't it nice?" when one hovers over the word "Example".

\blank
\midaligned{\tooltip[bottom]{an example}{Isn't it nice?}  of tooltip on the bottom}
\blank
\midaligned{an example of tooltip on the \tooltip[right]{right}{Isn't it nice?}}
\blank
\midaligned{\tooltip[left]{an}{Isn't it nice?}  example of tooltip on the left}

\stoptext

See also

ConTeXt-Forum