Skip to content

Instantly share code, notes, and snippets.

@amalgamatedclyde
Created October 3, 2013 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amalgamatedclyde/6814727 to your computer and use it in GitHub Desktop.
Save amalgamatedclyde/6814727 to your computer and use it in GitHub Desktop.
here is my dilemma. if i just use two Labels() and the code from the screen manager docs, everything is beautiful. if i comment-out everything but a single label from each of my 2 python files, only the one that is imported first will show.
import kivy
from kivy.uix.label import Label
from kivy.config import Config
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.lang import Builder
import studentListview2
import Layout_master6
kivy.require('1.7.1')
Config.set('graphics', 'width', '1280')
Config.set('graphics', 'height', '720')
l= Builder.load_file('Layout_master6.py')
m= Builder.load_file('studentListview2.py')
#sm.switch_to(screens[1])
sm = ScreenManager()
#l= Label(text='1')
screens[0].add_widget(l)
#m= Label(text='2')
screens[1].add_widget(m)
sm.switch_to(screens[0])
# later
# default :data:`ScreenManager.transition` is a :class:`SlideTransition`.
# options are `direction` and `duration`
sm.switch_to(screens[1], direction='right')
class screensApp(App):
def __init__(self, **kwargs):
super(screensApp, self).__init__(**kwargs)
def build(self):
return sm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment