Label#
A text label for annotating forms or interfaces.

Usage#
import toga
label = toga.Label("Hello world")
Notes#
Winforms does not support an alignment value of
JUSTIFIED
. If this alignment value is used, the label will default to left alignment.
Reference#
- class toga.widgets.label.Label(text, id=None, style=None)#
Create a new text label.
Inherits from
Widget
.- Parameters:
text (
str
) – Text of the label.id – The ID for the widget.
style – A style object. If no style is provided, a default style will be applied to the widget.
- focus()#
No-op; Label cannot accept input focus