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

Parameters

text$ - initial label text
x,y,width,height - initial shape of the label
group - a group gadget handle
style - appearance of the label

Description

CreateLabel creates a label gadget and returns a handle to it.

Label gadgets are simple, text only gadgets and do not generate any events.

The style parameter produces the following appearances:
0 - No border (default)
1 - Flat border
2 - No border?
3 - 3d sunken border

See also: SetGadgetText.

Example

; Create a window and some labels
win=CreateWindow("Test Labels",100,100,200,150,0,17)
CreateLabel("A normal label (style=0)",10,10,180,20,win,0)
CreateLabel("A Flat label (style=1)",10,40,180,20,win,1)
CreateLabel("Another 'normal' label (style=2)",10,70,180,20,win,2)
CreateLabel("A 3d sunken border (style=3)",10,100,180,20,win,3)

; The simplest event loop possible!
Repeat
Until WaitEvent()=$803
End ; bye!

Index

Click here to view the latest version of this page online