Panel.width read/write property
Get or set the Panel's width. The width starts from 0 (left side of the Panel) and increase to the right direction.
Example
local ui = require "ui"
-- create a fixed Panel
local win = ui.Window("Panel.height sample", "fixed", 320, 200)
-- create a Panel
local panel = ui.Panel(win, 0, 0, 100, 100)
panel.bgcolor = 0x00a0F0
-- keep increasing Panel width and height
async(function()
while(true) do
panel.height = panel.height + 1
panel.width = panel.width + 1
panel:center()
sleep(1)
end
end)
ui.run(win):wait()