Blitz3D+ Command Reference

CreateLabel ( text$,x,y,width,height,group[,style] )

Parameters

text$ - text to display

x,y - position of the label's top-left corner within the group's client area

width,height - size of the label

group - window or gadget group that owns the label

style (optional) - text layout
0: left aligned (default)
1: right aligned
2: centered
3: sunken frame

Description

Creates a static text label gadget and returns its handle.

Requires Extended language mode.

Labels are the captions of your GUI - the "Position X" next to a field, a heading over a list, a status line under a panel. They are display-only: a label never takes keyboard focus and posts no gadget-action events.

Static does not mean fixed, though. SetGadgetText updates a label instantly, which makes labels a cheap live readout - the selection and context menus sample uses one as its selection status line. Text is UTF-8, and SetGadgetFont can restyle it for headings.

Style 3 draws the label with a sunken frame, handy for read-only value displays.

See it working in the window and button sample and throughout the world editor shell sample.

See also: SetGadgetText, GadgetText, SetGadgetFont, CreateTextField, CreateLinkLabel.

Index