kivy - Kivy TextInput 文本溢出。TextInput 视口外的光标
问题描述
最后一个字母溢出
我正在使用 Kivy 1.10.1。我添加了一个文本输入(多行 = False)。上面输入的句子是“This is a long sentence being typed into Kivy”。所有的字母都输入了。但最后一个字母 - “y”在文本输入之外。我试过改变填充大小、边框大小和改变文本输入本身的大小。我不知道我做错了什么还是图书馆的错误。
编辑:(我应该在这里添加小部件代码)
text_input: input_text_field
canvas:
Color:
rgba: self.background_color_intensity_red, self.background_color_intensity_green, self.background_color_intensity_blue, 1
Rectangle:
size: 396, 768
pos: self.pos
source: "sprites/phone.png"
BoxLayout:
size: 354, 598
pos: 21, 96
orientation: 'vertical'
BoxLayout:
size_hint: 1, 0.1
pos: root.pos
orientation: 'horizontal'
Image:
size_hint: 0.15, 1
source: "sprites/profile_pic.png"
TextInput:
id: input_text_field
size_hint: 0.85, 0.5
pos_hint: {'top': 0.75}
background_color: 1,1,1,1
border: (20, 20, 20, 20)
multiline: False
halign: 'center'
focus: True
on_text_validate: self.parent.parent.parent.on_text_input()
BoxLayout:
size_hint: 1, 0.9
pos: root.pos
orientation: 'vertical'
谢谢你。
解决方案
推荐阅读
- javascript - 有没有办法只检查一个普通的 javascript 对象而不是任何其他特殊类型的对象(即日期)?
- ios - 如何在 UIView 中创建椭圆形清晰的颜色视图?
- asp.net - 不能应用于“IEnumerable”类型的操作数
' 和 `DateTime` ( >= & <=) - kubernetes - 如果我使用 Istio 进行映射,我需要大使吗?
- discord.js - 有什么方法可以在 discord.js api 中实现多语言?
- django - 权限在视图方法中不起作用 [Django restframework]
- yaml - 如何在 Netlify CMS 中访问根目录下的 .yml 文件?
- python - 查找多个 NumPy 数组的中值
- javascript - Socket.io 不会发射到房间
- r - 如何在R中的行和列中使用值为1的数据框的子集