2011-09-02 16:37:51 +00:00
|
|
|
from kivy.uix.accordion import Accordion, AccordionItem
|
|
|
|
from kivy.uix.label import Label
|
|
|
|
from kivy.app import App
|
|
|
|
|
2015-02-02 01:09:20 +00:00
|
|
|
|
2011-09-02 16:37:51 +00:00
|
|
|
class AccordionApp(App):
|
|
|
|
def build(self):
|
|
|
|
root = Accordion()
|
2012-12-28 15:11:20 +00:00
|
|
|
for x in range(5):
|
2011-09-02 16:37:51 +00:00
|
|
|
item = AccordionItem(title='Title %d' % x)
|
|
|
|
item.add_widget(Label(text='Very big content\n' * 10))
|
|
|
|
root.add_widget(item)
|
|
|
|
return root
|
|
|
|
|
2016-12-17 09:41:12 +00:00
|
|
|
|
2011-09-02 16:37:51 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
AccordionApp().run()
|