Panel.constructor(parent, [ x ], [ y ], [ width ], [ height ]) constructor


The Panel constructor returns a Panel, a simple surface that can contain other widgets.

Parameters

parent

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

[style]

[x]

An optional number that indicates the Panel horizontal position, in pixels.

[y]

An optional number that indicates the Panel vertical position, in pixels.

[width]

An optional number that indicates the Panel width, in pixels.

[height]

An optional number that indicates the Panel height, in pixels.

Example

local ui = require "ui" -- create a fixed Panel local win = ui.Window("Panel.constructor() sample", "fixed", 320, 200) -- create a Panel at position at the top left corner, sized 100x100 pixels local panel = ui.Panel(win, 0, 0, 100, 100) panel.border = true ui.run(win):wait()