No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
manpreet
Best Answer
2 years ago
I'm using kivy to create a small App for computer aided learning.
At the moment I have some problems with accessing config values">values. I get the value with
self.language = self.config.get('basicsettings', 'language')
in the main App-Class. That works fine, however, I don't know how to access these value inside another widget - in this case the AudioButton.
I'm using a ScreenManager, which contains a Screen. Inside is a BoxLayout, which contains a GridLayout and this holds several AudioButtons.
Now, in this AudioButton I want to know the current value of
self.language
defined in the mainApp.In .kv files I can do something like
to get it, but how to do it directly in Python?
If I use a dummy label in kv to get the value, it works, but when I change the setting, I need to restart the App, because I don't know what I need to add to
on_config_change()
to update the value during runtime.Here's a very simplified version of my App with all interesting parts, I hope.