awsc.base_control.DialogFieldResourceListSelector

class awsc.base_control.DialogFieldResourceListSelector(selector_class, label, default='', color=Color(Palette8Bit, 0, 208), selected_color=Color(Palette8Bit, 0, 220), label_color=Color(Palette8Bit, 220, None), label_min=0, primary_key=None)

A dialog field which allows selecting a single resource in a ResourceLister as the value of the field.

Attributes:
leftint

How far to the right is the textfield scrolled.

textstr

The text in the field. The primary key of the resource will be used for this purpose.

labelstr

The label of the field.

colorawsc.termui.color.Color

The color of the field when not selected.

label_colorawsc.termui.color.Color

The color of the field’s label.

selected_colorawsc.termui.color.Color

The color of the field when it is selected.

selector_classobject

An object with a selector method, which takes a callable as an argument and returns a frame list for the session. This object will be opened when the user interacts with the field.

primary_keystr

If set, overrides the primary key of the selector class.

Methods

input(inkey)

Input handler method for the field.

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

Paint callback for the field.

selector_callback(entry)

The callback the lister will call when an entry is selected.

__init__(selector_class, label, default='', color=Color(Palette8Bit, 0, 208), selected_color=Color(Palette8Bit, 0, 220), label_color=Color(Palette8Bit, 220, None), label_min=0, primary_key=None)

Methods

__init__(selector_class, label[, default, ...])

input(inkey)

Input handler method for the field.

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

Paint callback for the field.

selector_callback(entry)

The callback the lister will call when an entry is selected.

Attributes

value

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