Combobox.text read/write property
Get or set the current Combobox text content, as a string.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Combobox.text sample", "fixed",306, 100)
local label = ui.Label(win, "Select an item : ", 60, 30)
local combobox = ui.Combobox(win, { "LuaRT", "is", "fun"}, label.x+label.width+6, label.y-4)
function combobox:onChange()
win:status("Combobox.text : "..combobox.text)
end
combobox.onSelect = combobox.onChange
combobox:onChange()
win:show()
-- update user interface
repeat
ui.update()
until not win.visible