Combobox.constructor(parent, [editable], items, [x], [y], [width], [height]) constructor
The Combobox constructor returns a Combobox value representing a text box combined with a scrollable list.
Parameters
parent
An object that will own the Combobox. Parent objects can be any of Window, Groupbox, TabItem and Panel
editable
An optional boolean that indicates if the edit field of the combobox can be modified (the default value is true).
items
A table containing a list of strings (each string will be inserted in the list).
x
An optional number that indicates the Combobox horizontal position, in pixels. Zero means the left border of the parent.
y
An optional number that indicates the Combobox vertical position, in pixels. Zero means the top border of the parent.
width
An optional number that indicates the Combobox width in pixels.
height
An optional number that indicates the Combobox height in pixels.
Example
local ui = require "ui"
local win = ui.Window("ui.Combobox() constructor sample", "fixed", 320, 240)
local combobox = ui.Combobox(win, {"Item 1", "Item 2", "Item 3"}, 110, 110)
-- show the Window
win:show()
while win.visible do
ui.update()
end