Canvas.y read/write property


Get or set the Canvas vertical position. The vertical position start from 0 (top side of the parent widget) and increase to the bottom side of the parent widget.

Example

local ui = require "ui" require "canvas" -- create a simple window local win = ui.Window("canvas.x sample", 500, 400) local canvas = ui.Canvas(win) -- shows the window win:show() -- update user interface and increase canvas horizontal position repeat ui.update() canvas.y = canvas.y + 1 until not win.visible or (canvas.y > 400)