Created
July 9, 2012 19:36
-
-
Save AphonicChaos/3078434 to your computer and use it in GitHub Desktop.
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
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.factory import Factory | |
from kivy import properties | |
load_dialog = """\ | |
<LoadDialog>: | |
chooser: filechooser | |
BoxLayout: | |
size: root.size | |
pos: root.pos | |
orientation: "vertical" | |
FileChooserListView: | |
id: filechooser | |
""" | |
view = Builder.load_string(load_dialog) | |
class LoadDialog(Factory.BoxLayout): | |
chooser = properties.ObjectProperty() | |
def __init__(self, *args, **kwargs): | |
self.chooser.path = '/usr/bin/' | |
super(LoadDialog, self).__init__(*args, **kwargs) | |
class Foo(App): | |
def build(self): | |
return LoadDialog() | |
if __name__ == '__main__': | |
Foo().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment