Luart
Comprehensive Windows framework to develop in Lua
modules > ui > update

ui.update ( )

Update the user interface, process Windows messages and call widgets events.

Return value

This function returns no value.

Example


local ui = require "ui"

-- create a Window
local win = ui.Window("ui.Update() example")

-- create a Label in that window
local label = ui.Label(win, "Moving message !")

-- change font to bold and size 18
label.fontstyle = { bold = true }
label.fontsize = 18

-- center the label horizontaly
label.y = win.height/2 - label.height*2

-- show the window
win:show()

-- repeat until window is no more visible
repeat
	-- update user interface
	ui.update()
	-- increase Label horizontal position
	label.x = label.x + 2
	-- quit if message is no more visible
	if label.x > win.width then
		break
	end
until not win.visible