Window.childs readonly property
Get a list of the Window's widgets, as a table. Each items in the list is a widget who's parent is the current window.
Example
local ui = require "ui"
--- create a centered Window
local win = ui.Window("Window.childs example", 320, 200)
win:center()
-- create 5 labels on this Window
for i = 1, 5 do
ui.Label(win, " Label"..i.." ", 140, (i+28)*i).bgcolor = 0x606060
end
async(function()
while true do
for widget in each(win.childs) do
widget.bgcolor = 0xFF0000
sleep(800)
widget.bgcolor = 0x606060
end
end
end)
ui.run(win):wait()