class documentation
class ACMEInputField(Container):
Known subclasses: acme.textui.ACMEFieldOriginator.ACMEFieldOriginator
Constructor: ACMEInputField(label, value, suggestions, placeholder, ...)
A generic input field for the ACME text UI.
| Class | |
The message that is sent when the input field is submitted. |
| Method | __init__ |
Initialize the input field. |
| Method | compose |
Compose the input field. |
| Method | set |
Set the label of the field. |
| Method | set |
Set the suggestions for the input field. |
| Method | show |
Show the validation feedback. |
| Async Method | submit |
Submit the input field. |
| Method | value |
Set the value of the input field. |
| Property | input |
Return the input field. |
| Property | msg |
Return the message field. |
| Property | value |
Return the value of the input field. |
| Instance Variable | _field |
The input view of the input field. |
| Instance Variable | _field |
The label view of the input field. |
| Instance Variable | _field |
The message view of the input field. |
| Instance Variable | _label |
The label text of the input field. |
| Instance Variable | _placeholder |
The placeholder text of the input field. |
| Instance Variable | _suggestions |
The suggestions for the input field. |
| Instance Variable | _validators |
The validators of the input field. |
| Instance Variable | _value |
The value of the input field. |
def __init__(self, label:
str = 'a label', value: str = '', suggestions: list[ str] = [], placeholder: str = '', validators: Function = None, id: str = None):
¶
overridden in
acme.textui.ACMEFieldOriginator.ACMEFieldOriginatorInitialize the input field.
| Parameters | |
label:str | The label of the input field. |
value:str | The value of the input field. |
suggestions:list[ | A list of suggestions for the input field. |
placeholder:str | The placeholder for the input field. |
validators:Function | The validators for the input field. |
id:str | The ID of the input field. |
Show the validation feedback.
| Parameters | |
event:Input.Changed | The Input.Changed event that triggered the validation feedback. |
Submit the input field.
| Parameters | |
event:Input.Submitted | The Input.Submitted event that triggered the submission. |
overridden in
acme.textui.ACMEFieldOriginator.ACMEFieldOriginatorReturn the value of the input field.
| Returns | |
| The value of the input field. |