Skip to content

CreatePanel

Claude edited this page Oct 26, 2026 · 6 revisions

CreatePanel

Command Index · BlitzPlus · Gadgets

CreatePanel x%, y%, width%, height%, group%, style%=0  ; returns Int

Works in: BlitzPlus

Makes a rectangle that other gadgets can be placed on, so you can group them, hide them together or move them together. Give it a color with SetPanelColor or a picture with SetPanelImage. Style 1 draws a frame around it.

Graphics 320, 240, 32, 2
win   = CreateWindow("Panels", 10, 10, 300, 200, Desktop(), 3)
left  = CreatePanel(10, 10, 130, 140, win, 1)
right = CreatePanel(150, 10, 130, 140, win, 1)
SetPanelColor right, 180, 210, 255
CreateButton "Left", 10, 10, 100, 28, left
CreateButton "Right", 10, 10, 100, 28, right
Repeat
Until WaitEvent() = $803

CreatePanel

Parameter Type Default Description
x Int required Horizontal position inside the group.
y Int required Vertical position inside the group.
width Int required Width of the panel.
height Int required Height of the panel.
group Int required Window, tabber, canvas or another panel that holds it.
style Int 0 1 draws a frame. Add 65536 to not follow the group when it is resized. Defaults to 0.

Returns: A handle for the panel.

Related commands

Command Index · BlitzPlus · Gadgets

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally