
Prototype: GemRB.CreateLabel(WindowIndex, ControlID, x, y, w, h, font, text, align)

Metaclass Prototype: CreateLabel(ControlID, x, y, w, h, font, text, align)

Description: Creates and adds a new Label to a Window.

Parameters:
WindowIndex - the value returned from LoadWindow
ControlID   - the new control will be available via this controlID
x,y,w,h     - X position, Y position, Width and Height of the control
font        - a .bam resref which must be listed in fonts.2da too
text        - initial text of the label (must be string)
align       - label text alignment

Return value: N/A

Example:
 GemRB.CreateLabel(StartWindow, 0x0fff0000, 0,415,640,30, "EXOFONT", "", 1)
 Label=GemRB.GetControl(StartWindow, 0x0fff0000)
 GemRB.SetText(StartWindow, Label,GEMRB_VERSION)
The above lines add the GemRB version string to the PST main screen.

See also: CreateButton, SetText


MD5: aaeaa42947bb1bc3cde0719ad5e08b51
