Websites Navigation:
Airbit
|
Shop
|
m-shell.net
Languages:
EN
|
DE
Home
Download
Products
Make SIS
Documentation
Forum
Blog
Contact
Index
Module abgui
Class abgui.Label
is
abguibase.Widget
Known direct subclasses:
abgui.TextField
,
abgui.Button
A label widget displaying some text.
Constructor
function init(text=, align=LEFT|VCENTER)
Overrides
abguibase.Widget.init()
Initialize a new label.
Parameters:
text
– the text to show in the label.
align
– the horizontal and vertical alignment flags.
Fields
ascent
The ascent ratio of the font height (default is 0.8).
flags
The flags, defining horizontal and vertical alignment of the text within the label's rectangle.
font
The font for the text. null for the default font.
text
The text displayed in the label.
Functions
desiredSize
()
Get or compute the desired size.
draw
()
Draw the label text on its background.
drawText
(x, y)
Draw the text at a specific position.
setText
(text)
Set the text displayed by the label.
function setText(text)
Set the text displayed by the label.
Parameters:
text
– the text. Must not be null.
function drawText(x, y)
Draw the text at a specific position.
Parameters:
x
– the x coordinate of the start of the text.
y
– the y coordinate of the baseline of the text.
function draw()
Overrides
abguibase.Widget.draw()
Draw the label text on its background.
function desiredSize()
Overrides
abguibase.Widget.desiredSize()
Get or compute the desired size. The default size depends on the text and font.
Returns:
the size, as [width, height].
mShell Home
>
Documentation
> mdoc