Created
February 25, 2013 01:26
-
-
Save MightyThor/5026721 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#:kivy 1.5.1 | |
#:import kivy kivy | |
<ScreenOne>: | |
GridLayout: | |
size: root.size | |
rows: 3 | |
Label: | |
text: 'Screen One' | |
TextInput: | |
id: text_screen_one | |
Button: | |
text: 'Go to Screen Two' | |
on_press: root.manager.current = 'screentwo' | |
<ScreenTwo>: | |
GridLayout: | |
size: root.size | |
rows: 3 | |
Label: | |
text: 'Screen Two' | |
TextInput: | |
id: text_screen_two | |
focus: True | |
Button: | |
text: 'Go to Screen One' | |
on_press: root.manager.current = 'screenone' | |
This file contains hidden or 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.uix.screenmanager import ScreenManager, Screen | |
class ScreenOne(Screen): | |
pass | |
class ScreenTwo(Screen): | |
pass | |
class ScreenManagerErrorApp(App): | |
def build(self): | |
sm = ScreenManager() | |
sm.add_widget(ScreenOne(name='screenone')) | |
sm.add_widget(ScreenTwo(name='screentwo')) | |
return sm | |
if __name__ == '__main__': | |
ScreenManagerErrorApp().run() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment