glydget

Label

class Label(text='Label')

Bases: glydget.widget.Widget

The Label is a widget class that displays a limited amount of read-only text. Labels are used by several widgets (e.g. Button) to provide text display as well as by applications to display messages to the user. Most of the functionality of a Label is directed at modifying the style and layout of the text within the widget allocation. A Label is not focusable nor activable by default, which means that it cannot receive events directly.

Example usage:

label = Label(text='Hello world !')
label.show()

Known sub-classes:

Properties

Label.text Displayed text

Properties Details

Label.text

Displayed text

Type:str, read-write.