【问题标题】:Kivy: how do I make a non-editable text input?Kivy:如何进行不可编辑的文本输入?
【发布时间】:2018-09-22 06:02:01
【问题描述】:

如何使用户无法编辑文本输入?

TextInput:
    id:out
    background_color: (0, 0, 0, 1)
    foreground_color: (0, 1, 0, 1)
    multiline: True
    text:""

【问题讨论】:

  • readonly 属性设置为 True

标签: kivy textinput


【解决方案1】:

readonly 属性是你的朋友

TextInput:
    id:out
    background_color: (0, 0, 0, 1)
    foreground_color: (0, 1, 0, 1)
    multiline: True
    text:""
    readonly: True 

【讨论】:

  • 这样做甚至不允许我使用箭头键。如何允许至少导航?
  • @VisheshMangla - 您可以进行回调,每次更改文本时,文本都会返回您想要的值。
猜你喜欢
  • 1970-01-01
  • 2011-04-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-04-03
相关资源
最近更新 更多