AutoCompleteTextView

Screenshot

Autocompletetextview - Reference - Enaml-native - CodeLV

Example

from enamlnative.widgets.api import *


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

    TextView:
        text = "Pet type"

    AutoCompleteTextView: tv:
        #: Autocomplete items
        choices = ['Cat', 'Dog', 'Duck','Bird','Elephant', "Fish"]

        #: Min letters before autocomplete
        threshold = 1

        #: Placeholder
        placeholder = "Type an animal name"

    TextView:
        text << f"Selection: {tv.text}"

Declaration

class enamlnative.widgets.auto_complete_text_view.AutoCompleteTextView(parent=None, **kwargs)[source]

Bases: enamlnative.widgets.edit_text.EditText

A simple control for displaying read-only text.

choices

Auto complete choices

drop_down_height

Sets the current height for the auto-complete drop down list.

drop_down_width

Sets the current width for the auto-complete drop down list.

list_selection

Selected item within the list

threshold

Specifies the minimum number of characters the user has to type in the edit box before the drop down list is shown.

proxy

A reference to the ProxyLabel object.

Android Implementation

class enamlnative.android.android_auto_complete_text_view.AndroidAutoCompleteTextView[source]

Bases: enamlnative.android.android_edit_text.AndroidEditText, enamlnative.widgets.auto_complete_text_view.ProxyAutoCompleteTextView

An Android implementation of an Enaml ProxyAutoCompleteTextView.

widget

A reference to the widget created by the proxy.

adapter

An adapter to hold the choices

create_widget()[source]

Create the underlying widget.

init_widget()[source]

Initialize the underlying widget.

No iOS implementation found.