我可以创建我的文本输入,但是我无法输入文本,我可以使用回车键退格并输入一个新行,但输入一个字符是行不通的。 我的代码在下面
import kivy
kivy.require('1.0.6') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.lang import Builder
class Test(TabbedPanel):
pass
class MyApp(App):
def build(self):
return Test()
if __name__ == '__main__':
MyApp().run()
我的kv档案
<Test>:
do_default_tab: False
TabbedPanelItem:
text: 'Phone'
Label:
text: 'First tab content area'
TabbedPanelItem:
text: 'SMS'
BoxLayout:
Label:
text: 'Second tab content area'
Button:
text: 'Button that does nothing'
TabbedPanelItem:
text: 'USSD'
TextInput:
id: _a
hint_text: 'hello'
multiline: 'False'
size: 500,50
size_hint: None, None
text:'hello'