Skip to content

SetGadgetLayout

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
BlitzPlus

SetGadgetLayout

SetGadgetLayout:Void gadget:Int32, left:Int32, right:Int32, top:Int32, bottom:Int32
Parameter Mode Type Default Description
gadget In Int32 required Handle of the gadget.
left In Int32 required Behavior of the left edge: 0, 1 or 2.
right In Int32 required Behavior of the right edge: 0, 1 or 2.
top In Int32 required Behavior of the top edge: 0, 1 or 2.
bottom In Int32 required Behavior of the bottom edge: 0, 1 or 2.

Description

Says how a gadget follows its group when it changes size. Each side can be 0 for free (the distance to that edge changes), 1 for locked (the distance stays) or 2 for proportional (it scales with the group). The default is left and top locked.

Examples

Graphics 320, 240, 32, 2
win = CreateWindow("Resize me", 10, 10, 200, 150, Desktop(), 3)
box = CreateTextArea(10, 10, 170, 70, win)
SetGadgetLayout box, 1, 1, 1, 1
ok  = CreateButton("OK", 100, 90, 80, 28, win)
SetGadgetLayout ok, 0, 1, 0, 1
Repeat
Until WaitEvent() = $803

Media

SetGadgetLayout

Related Commands

SetButtonState, SetGadgetFont, SetGadgetShape, SetGadgetText, SetPanelColor, SetPanelImage, SetSliderRange, SetSliderValue

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally