Skip to content

CreateLabel

Claude edited this page Oct 26, 2026 · 7 revisions

CreateLabel

Command Index · BlitzPlus · Gadgets

CreateLabel text$, x%, y%, width%, height%, group%, style%=0  ; returns Int

Works in: BlitzPlus

Makes a piece of text that does not react to the user and sends no events. Long text is wrapped inside the box, and Chr$(13) breaks a line by hand. The style adds a frame:

Style Frame
0 None
1 Black line
3 Sunken 3D frame

Add 65536 to keep it from following when its group is resized.

Graphics 320, 240, 32, 2
win = CreateWindow("Labels", 10, 10, 300, 200, Desktop(), 3)
CreateLabel "No frame", 10, 10, 160, 24, win, 0
CreateLabel "Black frame", 10, 40, 160, 24, win, 1
CreateLabel "3D frame", 10, 70, 160, 24, win, 3
CreateLabel "Wraps by itself," + Chr$(13) + "or by hand.", 10, 100, 220, 50, win
Repeat
Until WaitEvent() = $803

CreateLabel

Parameter Type Default Description
text String required The text to show.
x Int required Horizontal position inside the group.
y Int required Vertical position inside the group.
width Int required Width of the label.
height Int required Height of the label.
group Int required Window, panel, tabber or canvas that holds it.
style Int 0 Frame, see the table. Defaults to 0.

Returns: A handle for the label.

Differences and known gaps:

  • The built-in font is wider than the font of the Windows interface, so give labels, buttons and lists a little more room than you would on Windows.

Related commands

Command Index · BlitzPlus · Gadgets

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally