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 allBasic Examples (1)
Applications (2)
Properties & Relations (4)
A mouse cursor may be partially transparent:
A mouse cursor typically has a transparent background:
If the object specifies a non‐transparent background, then that background will be used instead:
Mouse cursors can be non‐rectangular objects:
Use MouseAppearance to help identify a Locator as a resize widget:
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