-
Notifications
You must be signed in to change notification settings - Fork 26
Label
Alessandro Febretti edited this page Feb 8, 2014
·
4 revisions
module omegaToolkit extends Widget wraps omegaTookit::ui::Label
| Method(s) | Description |
|---|---|
static Label create(Container parent)
|
Creates a new Label widget, inside the specified Container. |
string getText(), setText(string name)
|
Gets or sets the label for the label |
setColor(Color color) |
Sets the label color (see Color). Example: label.setColor(Color('white'))
|
setFont(fontName) |
Sets the label font using a <font> <size> string. Example: label.setFont('fonts/arial.ttf 20')
|
In addition to widget style, Label supports the following additional styles:
-
font: sets the font used by the label. The style is a font name followed by a font size. Example:label.setStyleValue('font', 'fonts/arial.ttf 20') -
color: sets the font color used by the label. Example:label.setStyleValue('color', 'red') -
align: sets the font alignment used by the label. Alignment format is<vertical>-<horizontal>, where vertical is one oftop,middle,bottomand horizontal is one ofleft,center,right. Example:label.setStyleValue('align', 'middle-left')