text_input
pdwidgets.widgets.text_input
Single-line text input field.
TextInput(parent, x=0, y=0, w=None, h=None, align=None, align_to=None, fg=None, bg=None, visible=True, value=None, padding=None, hint='', text_height=TEXT_SIZE.LARGE, radius=6, max_length=None)
Bases: Widget
Single-line editable text field with focus management.
Initialize a TextInput: a single-line editable text field.
Tap the field to focus it (a text cursor appears and the border
highlights); typing appends printable characters, Backspace deletes, and
Enter releases focus. Focus order is managed by
:class:~pdwidgets._focus.FocusManager (Tab / Shift-Tab / arrows).
draw(_=None)
Draw the field box, its text or hint, and the cursor when focused.