Skip to content
Alessandro Febretti edited this page Feb 8, 2014 · 4 revisions

module omegaToolkit extends Widget wraps omegaTookit::ui::Label

Methods

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')

Styles

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 of top, middle, bottom and horizontal is one of left, center, right. Example: label.setStyleValue('align', 'middle-left')
Clone this wiki locally