TextField

class pyto_ui.TextField(text: str = '', placeholder: str = None)

A field to type single line text. The function passed to action will be called when the text field changes its text.

property autocapitalization_type: AutoCapitalization

The type of autocapitalization to use while editing th text. See Auto Capitalization constants for possible values.

Return type:

Auto Capitalization

property autocorrection: bool

A boolean indicating whether autocorrection is enabled.

Return type:

bool

property border_style: TextFieldBorderStyle

The border style of the Text Field.

Return type:

TEXT_FIELD_BORDER_STYLE

property did_begin_editing: callable

A function called when the Text Field begins editing. Takes the sender Text Field as parameter.

Return type:

callable

property did_end_editing: callable

A function called when the Text Field ends editing. Takes the sender Text Field as parameter.

Return type:

callable

property font: Font

The font of the text displayed on screen.

Return type:

pyto_ui.Font

property keyboard_appearance: KeyboardAppearance

The appearance of the keyboard used while editing the text. See Keyboard Appearance constants for possible values.

Return type:

Keyboard Appearance

property keyboard_type: KeyboardType

The type of keyboard to use while editing the text. See Keyboard Type constants for possible values.

Return type:

Keyboard Type

property placeholder: str

A gray text shown when there is no text.

Return type:

str

property return_key_type: ReturnKeyType

The type of return key to show on the keyboard used to edit the text. See Return Key Type constants for possible values.

Return type:

Return Key Type

property secure: bool

A boolean indicating whether the keyboard should be configured to enter sensitive data. The text entered by the user will be hidden.

Return type:

bool

property smart_dashes: bool

A boolean indicating whether smart dashes are enabled.

Return type:

bool

property smart_quotes: bool

A boolean indicating whether smart quotes are enabled.

Return type:

bool

property text: str

The text contained in the Text Field.

Return type:

str

property text_alignment: TextAlignment

The alignment of the text displayed on screen. See Text Alignment constants for possible values.

Return type:

Text Alignment

property text_color: Color

The color of the text displayed on screen.

Return type:

pyto_ui.Color