Label

From Pointui

Inherits Control.

Displays text on the screen.

Contents

Methods

void SetAlign(String horizontalAlign, String verticalAlign)

Sets the horizontal and vertical alignment for the text within the bounds of the Label control.

PARAMETERS

  • horizontalAlign – must be one of the following String values:
    • “Left”
    • “Center”
    • “Right”
  • verticalAlign – must be one of the following String values:
    • “Top”
    • “Center”
    • “Bottom”

void SetText(String textValue)

Sets the text to display for the Label control.

void SetFont(String fontName)

Sets the font to draw the text with.

PARAMETERS

  • fontName – must be one of the following String values:
    • “Font.Small”
    • “Font.Medium”
    • “Font.Large”
    • “Font.Title”

void SetColor(String colorName)

AVAILABLE SINCE: 2.0.22b Sets the color for the label text. The colorName must be defined in the Theme.xml file within the current theme folder.

void SetLines(int numberOfLines)

Sets the number of lines of text to display.

PARAMETERS

  • numberOfLines – how many lines of text to display. If the bounds are currently too small to fit the requested number of lines then it will be resized.

int GetFontHeight()

Returns the height in pixels of a single line of text with the current font. Typically used for dynamic layout.