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 nonclickable 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 draganddrop operations
    "DragGraphics"cursor used for dragging graphics selections

Examples

open allclose all

Basic Examples  (1)

Generalizations & Extensions  (1)

A cursor may be any Wolfram Language expression:

Applications  (2)

Indicate unselectable objects using the "NoOp" cursor:

Create a graphic that looks like a character and does not change the cursor:

Properties & Relations  (4)

A mouse cursor may be partially transparent:

A mouse cursor typically has a transparent background:

If the object specifies a nontransparent background, then that background will be used instead:

Mouse cursors can be nonrectangular objects:

Use MouseAppearance to help identify a Locator as a resize widget:

Neat Examples  (2)

A mouse cursor with color animation:

A highly magnified and visible text selection cursor:

Wolfram Research (2010), MouseAppearance, Wolfram Language function, https://reference.wolfram.com/language/ref/MouseAppearance.html.

Text

Wolfram Research (2010), MouseAppearance, Wolfram Language function, https://reference.wolfram.com/language/ref/MouseAppearance.html.

CMS

Wolfram Language. 2010. "MouseAppearance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MouseAppearance.html.

APA

Wolfram Language. (2010). MouseAppearance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MouseAppearance.html

BibTeX

@misc{reference.wolfram_2022_mouseappearance, author="Wolfram Research", title="{MouseAppearance}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/MouseAppearance.html}", note=[Accessed: 03-July-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_mouseappearance, organization={Wolfram Research}, title={MouseAppearance}, year={2010}, url={https://reference.wolfram.com/language/ref/MouseAppearance.html}, note=[Accessed: 03-July-2022 ]}