【发布时间】:2020-10-04 05:03:21
【问题描述】:
我正在尝试通过按 Shift+Tab 来向后循环浏览我的 TextInputs(我知道没什么特别的)。我只是不知道如何让它工作。它总是跳到下一个 TextInput。我在 Google 中没有找到任何内容。
此外,我希望在 focus=True 时选择整个 TextInput.text。也没有让它正常工作。
请帮帮我:-D
这是我的最小示例:
import kivy
kivy.require('1.11.0')
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.lang import Builder
Builder.load_string('''
<CustomInput@TextInput>:
text: "Blindtext"
size_hint_y: 0.1
pos_hint: {"center_y": 0.5}
multiline: False
write_tab: False
<Box>:
padding: 20,0,20,0
spacing: 10
CustomInput
CustomInput
CustomInput
''')
class Box(BoxLayout):
pass
class TestApp(App):
def build(self):
return Box()
if __name__ == "__main__":
TestApp().run()
非常感谢! 干杯, smarwin
【问题讨论】:
标签: tabs kivy focus textinput shift