Panel.cursor read/write property


Get or set the image of the mouse cursor as it hovers over the Panel. Mouse cursors are represented by strings :

  • "arrow" : the default Panels mouse cursor.
  • "cross" : a crosshair cursor.
  • "working" : the standard arrow with a small hourglass.
  • "hand" : a hand cursor.
  • "help" : the standard arrow with a small question mark.
  • "ibeam" : the default I-Beam text cursor.
  • "forbidden" : a slashed circle cursor.
  • "cardinal" : a four-pointed arrow pointing up, down, right, and left.
  • "horizontal" : a double-pointed arrow pointing right and left.
  • "vertical" : a double-pointed arrow pointing up and down.
  • "leftdiagonal" : a double-pointed arrow pointing topright down to the left.
  • "rightdiagonal" : a double-pointed arrow pointing topleft down to the right.
  • "up" : an arrow pointing up.
  • "wait" : a hourglass cursor.
  • "none" : no cursor is displayed.

Example

local ui = require "ui" -- create a fixed Panel local win = ui.Window("Panel.cursor sample", "fixed", 320, 200) -- create a Panel, mouse cursor will disappear when hovering local panel = ui.Panel(win, 0, 0, 100, 100) panel.bgcolor = 0xffcc00 panel.cursor = "none" panel:center() ui.run(win):wait()