我有一段代码。(1) 应显示TextInput值,但首先它不可编辑,单击相应的复选框后,TextInput将可编辑。
(2) 使用迭代,标签和TextInput应该获得值。Label和TextInput处的值不应该是硬编码的(尽管在我的代码中,@FJSevilla帮了我这个忙)。
(3) 但是,Label和TextInput的值存储在json格式的变量中。类似这样的东西(您可以考虑像map中的key,value pair)[variable='{“a”:“Goc”,“b”:“Coc”,“c”:“Dow”}']
(您可以查看图表了解更多间隙)。
我很感激你的帮助。在from kivy.app import App
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.lang import Builder
Builder.load_string("""
:
do_default_tab: False
TabbedPanelItem:
text: 'page1'
BoxLayout:
padding: 50, 50, 50, 50
orientation: 'horizontal'
BoxLayout:
spacing: 50
orientation: 'vertical'
size_hint_x: 1
Label:
text: 'a'
Label:
text: 'b