awsc.termui.dialog.DialogFieldLabel
- class awsc.termui.dialog.DialogFieldLabel(texts, default_color=Color(Palette8Bit, 220, None), centered=True)
A field which displays a static text. Cannot be selected.
- Attributes:
- default_colorawsc.termui.color.Color
The default color for the text of this label.
- textslist(tuple(str, awsc.termui.color.Color))
A list of text snippets, each associated with a color to draw it with. Text snippets are printed sequentially. If any list entry is a str instead of a tuple, it will be printed with the default color. This is done for the sake of both legacy and simplicity.
Methods
add_text
(text[, color])Adds a new text snippet to the label, optionally with a set color.
input
(inkey)Input handler method for the field.
paint
(x0, x1, y[, selected])Paint callback for the field.
- __init__(texts, default_color=Color(Palette8Bit, 220, None), centered=True)
Methods
__init__
(texts[, default_color, centered])add_text
(text[, color])Adds a new text snippet to the label, optionally with a set color.
input
(inkey)Input handler method for the field.
paint
(x0, x1, y[, selected])Paint callback for the field.
Attributes
text
Property.
value
Read-only property for retrieving a generalized value of the field.