Lineedit

Simple example:

line = ui.LineEdit(text='edit me')
open in new tab

Interactive example:

from flexx import app, ui, event

class Example(ui.Widget):

    def init(self):
        with ui.VBox():
            self.line = ui.LineEdit(flex=0,
                                    placeholder_text='type here',
                                    autocomp=['foo', 'bar'])
            ui.Label(flex=0, text='copy:')
            self.label = ui.Label(flex=1)

    class JS:
        @event.connect('line.text')
        def _change_label(self, *events):
            self.label.text = events[-1].new_value
open in new tab


class flexx.ui.LineEdit(*init_args, **kwargs)

Inherits from: Widget

An input widget to edit a line of text (aka HTML text input).

autocomp

property – A tuple/list of strings for autocompletion. Might not work in all browsers.

disabled

property – Whether the line edit is disabled.

password_mode

property – Whether the insered text should be hidden or not.

placeholder_text

property – The placeholder text (shown when the text is an empty string).

submit

emitter – Event emitted when the user strikes the enter or return key.

text

property – The current text.