ClickPane

ClickPane[image,func]

represents a clickable pane that displays as image and applies func to the coordinates of each click within the pane.

ClickPane[image,{{xmin,ymin},{xmax,ymax}},func]

specifies the range of coordinates to use.

Details and Options

  • The image in a click pane can be a graphic or any other expression.
  • For a Graphics object g, ClickPane[g,func] by default takes the range of coordinates supplied to func to be the range of graphics coordinates corresponding to PlotRange in g.
  • For a general expression, ClickPane[expr,func] takes the range of coordinates to be 0 to 1 in each direction.

Examples

open allclose all

Basic Examples  (2)

Move the point to where the "click" occurred:

In[1]:=
Click for copyable input
Out[1]=

Center the disk on mouse clicks:

In[1]:=
Click for copyable input
Out[1]=

Applications  (6)

Properties & Relations  (1)

Possible Issues  (1)

See Also

LocatorPane  Pane  Button  Manipulate  ArrayPlot  GestureHandler  EventHandler

Tutorials

Introduced in 2007
(6.0)