ui.task readonly


Get the current ui Task, that process ui events in the background. The ui Task is terminated once the ui.mainWindow is closed, or when using Task:cancel() programmaticaly

Example

--! luart-extensions import ui --- create a centered Window local win = ui.Window("TabItem.childs example", 460, 320) local tab = ui.Tab(win, {"TabItem"}) tab:center() -- create 5 labels on this Window for i = 1, 5 do ui.Label(tab.items[1], " Label"..i.." ", 120, (i+24)*i).bgcolor = 0x007acc end async(function() while true do for widget in each(tab.items[1].childs) do widget.bgcolor = 0xFF0000 sleep(800) widget.bgcolor = 0x007acc end end end) await win:showasync()