Input
Input
¶
Bases: Widget
A text input widget.
cursor_width: int
property
¶
The width of the input (with extra space for cursor at the end).
Changed
¶
Submitted
¶
__init__(value=None, placeholder='', highlighter=None, password=False, name=None, id=None, classes=None)
¶
Initialise the Input
widget.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
str | None
|
An optional default value for the input. |
None
|
placeholder |
str
|
Optional placeholder text for the input. |
''
|
highlighter |
Highlighter | None
|
An optional highlighter for the input. |
None
|
password |
bool
|
Flag to say if the field should obfuscate its content. Default is |
False
|
name |
str | None
|
Optional name for the input widget. |
None
|
id |
str | None
|
Optional ID for the widget. |
None
|
classes |
str | None
|
Optional initial classes for the widget. |
None
|
insert_text_at_cursor(text)
¶
Insert new text at the cursor, move the cursor to the end of the new text.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
New text to insert. |
required |