Panel.y readwrite


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

Example

--! luart-extensions import ui -- create a fixed Window local win = ui.Window("Panel.y sample", "fixed", 320, 200) -- create a Panel local panel = ui.Panel(win, 0, 0, 100, 100) panel.bgcolor = 0xF0A000 panel:center() panel.y = 0 async(function() while true do sleep() panel.y = panel.y + 2 if panel.y > win.height-panel.height then win:hide() end end end) await win:showasync()