awsc.termui.dialog.DialogFieldText

class awsc.termui.dialog.DialogFieldText(label, text='', color=Color(Palette8Bit, 0, 208), selected_color=Color(Palette8Bit, 0, 220), label_color=Color(Palette8Bit, 220, None), label_min=0, password=False, accepted_inputs=None)

An input textfield on the dialog.

Attributes:
labelstr

The text to display next to the input field.

textstr

The text that is currently typed into the input field.

colorawsc.termui.color.Color

The color of the textfield when not selected.

selected_colorawsc.termui.color.Color

The color of the textfield when selected.

label_colorawsc.termui.color.Color

The color of the label of the textfield.

label_minint

The minimum width that must be allocated for the label.

passwordbool

If set, masks the text of the textfield with asterisks.

drawableint

The calculated width of the interactive part of the textfield.

leftint

How much the textfield is scrolled to the right, in characters.

accepted_inputsstr

A string of characters which are acceptable inputs in the textfield. No character not present in the string will be typeable into the textfield.

Methods

input(inkey)

Input handler method for the field.

paint(x0, x1, y[, selected])

Paint callback for the field.

__init__(label, text='', color=Color(Palette8Bit, 0, 208), selected_color=Color(Palette8Bit, 0, 220), label_color=Color(Palette8Bit, 220, None), label_min=0, password=False, accepted_inputs=None)

Methods

__init__(label[, text, color, ...])

input(inkey)

Input handler method for the field.

paint(x0, x1, y[, selected])

Paint callback for the field.

Attributes

value

Read-only property for retrieving a generalized value of the field.