List:constructor(parent, items, [x], [y], [width], [height])constructor


The List constructor returns a List value representing a scrollable list of items.

Parameters

parent

An object that will own the List. Parent objects can be any of Window, Groupbox, TabItem and Panel

items

A table containing a list of strings (each string will be inserted in the List).

[x]

An optional number that indicates the List horizontal position, in pixels. Zero means the left border of the parent.

[y]

An optional number that indicates the List vertical position, in pixels. Zero means the top border of the parent.

[width]

An optional number that indicates the List width in pixels.

[height]

An optional number that indicates the List height in pixels.

Return value

The constructor returns a new List instance.

Example

--! luart-extensions import ui local win = ui.Window("ui.List() constructor sample", "fixed", 320, 240) local list = ui.List(win, {"Item 1", "Item 2", "Item 3"}, 120, 60) -- show the Window win:show() while win.visible do ui.update() end