EditText

Screenshot

Edittext - Reference - Enaml-native - CodeLV

Example

from enamlnative.widgets.api import *

enamldef Text(TextView):
    #: Add Spacing
    padding = (0, 40, 0, 0)

enamldef ContentView(ScrollView):
    Flexbox:
        flex_direction = "column"
        align_items = "stretch"

        Text:
            text = "Observe the text attribute for responding to changes"
        EditText: et:
            text = ""
        EditText:
            text := et.text

        Text:
            text = "Set placholder text"
        EditText:
            placeholder = "Placeholder here"

        Text:
            text = "Set input types to change keyboard and display"
        EditText:
            placeholder = "Input type password"
            input_type = "text_password"
        EditText:
            placeholder = "Input type phone"
            input_type = "phone"

        Text:
            text = "Respond to keyboard actions"
        EditText: editor:
            attr action = None
            placeholder = "Press the keyboard send button"
            editor_actions = True
            editor_action :: self.action = change
        Text:
            text << "{}".format(editor.action)

Declaration

class enamlnative.widgets.edit_text.EditText(parent=None, **kwargs)[source]

Bases: enamlnative.widgets.text_view.TextView

A simple control for displaying read-only text.

selection

Text selection

input_type

Make editable by default

placeholder

Placeholder text

style

Style (iOS)

proxy

A reference to the ProxyLabel object.

Android Implementation

class enamlnative.android.android_edit_text.AndroidEditText[source]

Bases: enamlnative.android.android_text_view.AndroidTextView, enamlnative.widgets.edit_text.ProxyEditText

An Android implementation of an Enaml ProxyEditText.

widget

A reference to the widget created by the proxy.

create_widget()[source]

Create the underlying widget.

No iOS implementation found.