具有自动完成功能的Kivy TextInput [英] Kivy TextInput with autocomplete

查看:63
本文介绍了具有自动完成功能的Kivy TextInput的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手.我想知道是否存在一种创建具有自动完成功能的文本输入的方法,该方法可让您从具有200个项目的字典中进行选择.

I am new to kivy. I want to know if there is a way to create a textinput with autocomplete functionality, that lets you select from a dictionary with 200 items.

类似于HTML/CSS中的select2

Similar to the select2 that you have in HTML/CSS

推荐答案

您可以自己实现它,只需绑定on_text事件并更改 suggestion_text 属性.您还可以检查 TAB 键按下事件,以了解何时将文本更改为建议的补全.

You can implement it yourself, just bind the on_text event and change the suggestion_text property. you may also check for TAB key press event to know when to change the text to the suggested completion.

这篇关于具有自动完成功能的Kivy TextInput的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆