Created
October 14, 2014 17:19
-
-
Save kived/892850a778a2ebd4e662 to your computer and use it in GitHub Desktop.
Kivy: FileChooser multi-view test app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kivy | |
kivy.require('1.8.1') | |
from kivy.app import App | |
from kivy.lang import Builder | |
root = Builder.load_string(''' | |
BoxLayout: | |
orientation: 'vertical' | |
BoxLayout: | |
size_hint_y: None | |
height: sp(72) | |
#test list view | |
# FileChooserListView | |
#test icon view | |
# FileChooserIconView | |
#test multi chooser | |
Button: | |
text: 'Icon View' | |
on_press: fc.view_mode = 'icon' | |
Button: | |
text: 'List View' | |
on_press: fc.view_mode = 'list' | |
FileChooser: | |
id: fc | |
on_submit: print 'on_submit', args | |
FileChooserIconLayout | |
FileChooserListLayout | |
''') | |
class TestApp(App): | |
def build(self): | |
return root | |
if __name__ == '__main__': | |
TestApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment