Answers for "how to switch screen in kivy python"

2

how to switch screens in kivy

from kivy.uix.screenmanager import ScreenManager, Screen

# Create the manager
sm = ScreenManager()

# Add few screens
for i in range(4):
    screen = Screen(name='Title %d' % i)
    sm.add_widget(screen)

# By default, the first screen added into the ScreenManager will be
# displayed. You can then change to another screen.

# Let's display the screen named 'Title 2'
# A transition will automatically be used.
sm.current = 'Title 2'
Posted by: Guest on March-02-2021
2

kivy changing screen in python

self.parent.current = 'screen_name_you_want_to_switch_to'
Posted by: Guest on June-11-2020

Code answers related to "how to switch screen in kivy python"

Python Answers by Framework

Browse Popular Code Answers by Language