Each argument is converted to a
string
if needed, following the same rules as the standard Lua tostring()
function.Window:status([msg, ...]) method
Hide or show the window status bar to display one or more messages.
Parameters
[msg]
One ore more optional strings, which represents messages to be displayed in the status bar. Each message is displayed in a part of the status bar.
When called without arguments, the Window status bar is hidden.
Return value
The method returns no value.Example
local ui = require "ui"
-- create a window
local win = ui.Window("Window:status() sample", 500, 200)
-- create a label
local label = ui.Label(win, "Status bar text :", 50, 60)
local entry = ui.Entry(win, "Type any message to be displayed in the status bar", label.x + label.width + 10, label.y - 4)
function entry:onChange()
win:status(entry.text)
end
-- set the window status bar for the first time
entry:onChange()
win:show()
while win.visible do
ui.update()
end