Combobox:onSelect(ComboItem) event
Event fired when the user has choosen an item in the Combobox list.
Return value
The event returns no value.Example
local ui = require "ui"
-- create a window
local win = ui.Window("Combobox:onSelect() sample", 320, 200)
local label = ui.Label(win, "Name : ", 80, 75)
local combobox = ui.Combobox(win, {"Sam", "Mary", "John"}, label.x + label.width + 8, label.y - 4, 100)
function combobox:onSelect(item)
ui.info("Welcome "..item.text.." !")
end
win:show()
while win.visible do
ui.update()
end