Tab.constructor(parent, items, [ x ], [ y ], [ width ], [ height ]) constructor
The Tab constructor returns a Tab value representing a notebook widget, which manages multiple views with associated tabs.
Parameters
parent
An object that will own the Tab. Parent objects can be any of Window, Groupbox, TabItem and Panel
items
A table containing strings (each string will be inserted in the Tab).
x
An optional number that indicates the Tab horizontal position, in pixels. Zero means the left border of the parent.
y
An optional number that indicates the Tab vertical position, in pixels. Zero means the top border of the parent.
width
An optional number that indicates the Tab width in pixels.
height
An optional number that indicates the Tab height in pixels.
Example
local ui = require "ui"
local win = ui.Window("ui.Tab() constructor sample", "fixed", 314, 216)
local tab = ui.Tab(win, {"Item 1", "Item 2", "Item 3"})
-- show the Window
win:show()
while win.visible do
ui.update()
end