The Accordion offers dividers to select between different screens.
The Accordion widget is used for the root. The App class is needed for any application.
We have to have a subclass of the App class.
# ex57.py from kivy.uix.accordion import Accordion from kivy.app import App class Ex57(Accordion): pass class Ex57App(App): def build(self): return Ex57() if __name__ == '__main__': Ex57App().run()
In the kv file, the MyImage dynamic class is created and it allows for a stretchable image. The orientation of the Accordion is 'vertical'. The default is 'horizontal'.
The first 3 screens are the images p1, p2 and p3.
The next 2 screens corresponds to images p4 and p5.
# ex57.kv <MyImage@Image>: keep_ratio: False allow_stretch: True <Ex57>: orientation: 'vertical' AccordionItem: title: 'The Basin' MyImage: source: 'p1.png' AccordionItem: title: 'Boise Rock' MyImage: source: 'p2.png' AccordionItem: title: 'Old Forest' MyImage: source: 'p3.png' AccordionItem: title: 'Old Man of the Mountain' MyImage: source: 'p4.png' AccordionItem: title: 'Flume Gorge' MyImage: source: 'p5.png'
In this result, we select the p3 image. Any widgets, including layouts, could be used for the individual Accordion items. Besides the orientation, we can also change the animation transition effects between different screens.
Good job nice information ,Thank you for sharing, keep postpython training, python online training,learn python online , learn python programming
ReplyDeletenice post
ReplyDeletePython:
ReplyDeleteGood Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
https://www.emexotechnologies.com/online-courses/python-training-in-electronic-city/
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeletePython Training in electronic city
nice information for beginners.thank you.
ReplyDeletejavacodegeeks
welookups python
This article is awesome. meanwhile I have also written one article on Monitors and technology. So if you want to check it out then you can Click here for more information related to Monitors
ReplyDeleteQuickbooks Multi user mode not working
ReplyDeleteQuickbooks Diagnostic tool
QuickBooks error code 15106
Quickbooks accounting software
QuickBooks Password Reset Tool
Sage 50 accounting software
ReplyDeleteHow to Reset Quickbooks Password?
Reset Quickbooks Password
Quickbooks Password change
Quickbooks won't open error
ReplyDeleteUICKBOOKS ERROR 3371 STATUS CODE 11118
Quickbooks online vs Quickbooks Desktop
Quickbooks error 9999
ReplyDeleteQuickbooks Error code 6000
Quickbooks Error 6000
Quickbooks Error 6000
Quickbooks Error code 9999
I'm extremely impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a great blog like this one today..apple kundenservice berlin
ReplyDelete