1
ファイルの読み込みボタンが押されたときに「タブ」を切り替えたい。つまり、ファイルが読み込まれたときに2番目のAccordionItemに切り替える必要がある。これをプログラムで行うにはどうすればよいですか?プログラムでアコーディオンの「タブ」を切り替える
42 Accordion:
43 orientation: 'horizontal'
44 anim_duration: 2
45
46 AccordionItem:
47 title: 'Load File'.title()
48 Page:
49 Header:
50 text: 'Load File'.title()
51 Body:
52 BoxLayout:
53 orientation: 'vertical'
54
55 FileChooser:
56 id: _filechooser
57 dirselect: False
58 multiselect: False
59 show_hidden: False
60 path: '~/'
61 filters: ['*.[Zz][Ii][Pp]', '*.[Xx][Mm][Ll]']
62 FileChooserIconLayout
63
64 Button:
65 height: '48dp'
66 size_hint_y: None
67 text: 'Load'.title()
68 on_release: root.load(_filechooser.path, _filechooser.selection)
69
70 Footer:
71 text: 'Choose file to load…'
72
73 AccordionItem:
74 title: 'Dmarc Report'.title()
75 Page:
76 Header:
77 text: 'Dmarc Report'.title()
78 Body:
79 Footer:
80 text: 'Viewing currently loaded file…'