Answers for "update labels in Kivy"

0

update labels in Kivy

//GUIDE FOR Updating Label Text in Multiple Screens
//When you try to change Kivy Label in another Class or Screen, you shouldn't
//call the name of the class(ex. Message().update_info()), as it will create a 
//temporary object unrelated to the Existing Screen, therefore, you cannot access
//or update the label. What you should do is to call the Screen first
//(ex. self.manager.get_screen())

//Look for the documentation of Screen Manager of Kivy for a more specific syntax
//You can also look through this post in Stack Overflow(commented by a God, Amen)
https://stackoverflow.com/questions/33498120/how-to-update-label-text-on-second-kivy-screen

//I also found this helpful article
https://medium.com/nerd-for-tech/kivy-use-get-screen-to-access-objects-from-other-screens-8d4d6f288f3
Posted by: Guest on March-07-2022

Browse Popular Code Answers by Language