Module vTextField
Editable textfield with auto-sizing and support for placeholder-text .
#
## Features * Support for "placeholder" text * Listen to characters as they are entered (based on a multiline_textfield) * Auto-size control as text is entered * Detect when Return is pressed ('submit' event)
Functions
build_textfield () | re-usable (make it possible to define separate build() methods for classes that inherit this one |
set_text (val, user_input) | Getter & Setter methods |
Fields
self.placeholder | string, placeholder text (when empty) |
self.edit_mode | boolean, decide if textfield has focus |
self.edit_mode_observable | ObservableBoolean (implemented via idle notifier) |
self.auto_size | boolean, decide if size of textfield follows the text entered |
self.text | string, empty string is "" |
self.value | string, alias for text |
self.submitted | ObservableBang, fired when using Return to submit |
self._suppress_notifier | boolean |
Functions
- build_textfield ()
- re-usable (make it possible to define separate build() methods for classes that inherit this one
- set_text (val, user_input)
-
Getter & Setter methods
Parameters:
- val (string), input text to display
- user_input (boolean), programmatic input
Fields
- self.placeholder
- string, placeholder text (when empty)
- self.edit_mode
- boolean, decide if textfield has focus
- self.edit_mode_observable
- ObservableBoolean (implemented via idle notifier)
- self.auto_size
- boolean, decide if size of textfield follows the text entered
- self.text
- string, empty string is ""
- self.value
- string, alias for text
- self.submitted
- ObservableBang, fired when using Return to submit
- self._suppress_notifier
- boolean