简体   繁体   English

在Kivy中将文本插入TextInput()

[英]Insert text to TextInput() in Kivy

Is there a way to insert text to a textinput without overwriting the previous text? 有没有一种方法可以在不覆盖先前文本的情况下将文本插入到textinput中? Textinput().text = "something" deletes the previous text.I also want to add it everytime in a new line. Textinput()。text =“ something”删除前一个文本。我也想每次都在新行中添加它。

It has nothing to do with kivy, these are basics of python language. 它与kivy无关,这是python语言的基础。 Instead of overwriting the varliable with = sign, use += to append. 与其使用=符号覆盖变量,不如使用+=追加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM