MouseAppearance

MouseAppearance[expr,graphic]

changes the mouse cursor to appear as graphic when the mouse pointer is in the area where expr is displayed.

MouseAppearance[expr,graphic,{x,y}]

uses the coordinates {x,y} in the graphic as the hotspot for the mouse cursor.

MouseAppearance[expr,graphic,Scaled[{x,y}]]

uses the scaled coordinates {x,y} as the hotspot for the mouse cursor.

MouseAppearance[expr,"cursorname"]

uses the named cursor "cursorname" as the mouse cursor.

MouseAppearance[expr,Automatic]

reverts to normal mouse cursor behavior.

Details

  • The second argument of MouseAppearance can be any expression. The Wolfram Language will automatically Rasterize the expression into a form appropriate for use as a mouse cursor.
  • If the second argument of MouseAppearance is too large to for the system to represent as a cursor, the Wolfram Language will automatically rescale it to the largest size possible for a mouse cursor on your system while preserving the aspect ratio.
  • MouseAppearance may be nested. The innermost MouseAppearance wrapping the expression pointed to by the mouse will always take precedence.
  • If no hotspot is specified for a mouse cursor, then the hotspot is assumed to be in the center.
  • Named cursors cannot have custom hotspot values.
  • If the second argument is a Graphics object, then the hotspot {x,y} will be in the coordinate system of that graphic. Otherwise, coordinates specified as {x,y} will be in the Scaled coordinate system.
  • Named cursors that reference operating system default cursors may appear differently on different computers.
  • The following values may be given for "cursorname":
  • "Arrow"the default mouse pointer
    "Edit"cursor used for selecting text
    "LinkHand"cursor used for hyperlinks
    "NoOp"cursor used to indicate a non-clickable region
    "FrameLRResize"cursor used for horizontal resize
    "FrameTBResize"cursor used for vertical resize
    "FrameFallingResize"cursor used for diagonal resize
    "FrameRisingResize"cursor used for diagonal resize
    "DragAndDrop"cursor used for drag-and-drop operations
    "DragGraphics"cursor used for dragging graphics selections

Examples

open allclose all

Basic Examples  (1)

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

Generalizations & Extensions  (1)

Applications  (2)

Properties & Relations  (4)

Neat Examples  (2)

See Also

Tooltip  Mouseover  MouseAnnotation  MousePosition

Introduced in 2010
(8.0)