Panel.y read/write property
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
local ui = require "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)
ui.run(win):wait()