Panel:constructor([x], [y], [width], [height])constructor


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

Parameters

Parameters

[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.

Return value

The constructor returns a new Panel instance.

Example

--! luart-extensions import 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 await win:showasync()