Button.y read/write property


Get or set the Button 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" -- create a simple window local win = ui.Window("Button.y sample", 300, 600) local button = ui.Button(win, "Click Me !") function button:onClick() ui.msg("You caught me !") end -- shows the window win:show() -- update user interface and increase Button horizontal position repeat ui.update() button.y = button.y + 1 until not win.visible or (button.y > 600)