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


The Groupbox constructor returns a Groupbox value representing a group of related controls. Whenever another widget is placed within a Groupbox, that groupbox becomes its parent.

Parameters

parent

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

caption

A string representing the Groupbox's text.

x

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

y

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

width

An optional number that indicates the Groupbox width in pixels, autosized to fit text content if omitted.

height

An optional number that indicates the Groupbox height in pixels, autosized to fit text content if omitted.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("Groupbox.constructor() sample", 220, 230) -- create a Groupbox on this window, with "LuaRT" as text, at the x position 130, and y position 80 local groupbox = ui.Groupbox(win, "LuaRT", 20, 15) win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible