Panel

This function creates a panel widget. A panel is a blank non-interactive widget used to group other widgets.

You can set the script boolean value border to true to enable a visible border and increase the widget padding.

Syntax

Parameters

Returns

Returns a new panel.

Example

local window = Window:Create()
local context = Context:Create(window)
local gui = GUI:Create(context)
local base = gui:GetBase()
base:SetScript("Scripts/GUI/Panel.lua")

x=20
y=20
local sep=30

widget = Widget:Panel(x,y,300,150,base)
widget:SetBool("border",true)
y=y+sep

while true do
if window:Closed() then return end
if window:KeyHit(Key.Escape) then return end

while EventQueue:Peek() do
local event = EventQueue:Wait()
if event.id == Event.WidgetAction then
System:Print("WidgetAction")
elseif event.id == Event.WidgetSelect then
System:Print("WidgetSelect")
end
end

context:Sync()
end