kivy-language

Call methods/functions from a kivy button (on_release)

Call methods/functions from a kivy button (on_release) Question: I am just starting to write this program but have already ran into problems (I don’t really know what I did, just coppied it from somewhere and tweaked it a little bit). So basically I want that if a button is pressed, the on_release: function in the …

Total answers: 1

How can i use .kv file in different folders?

How can i use .kv file in different folders? Question: I don’t know how to use .kv file so i just want to summary example. For example let we have 2 folders. These folders: src and design. src folder contain: main.py design folder contain: main.kv I want to know just simple example in this situation. …

Total answers: 1

How to remove a specific Rectangle in Kivy?

How to remove a specific Rectangle in Kivy? Question: I want to know how to remove a specific Rectangle object in Kivy. I create the Rectangle in .py file by pressing a button and I want to the second button could be able to remove that specific Rectangle. My .py code: import kivy kivy.require("1.10.1") from …

Total answers: 2

Kivy SyntaxError while overwriting instance of a class in .kv

Kivy SyntaxError while overwriting instance of a class in .kv Question: Hi i created a class "LabelledSlider" in my .kv file that contains 2 Labels and 1 Slider with some properties already set in the definition of the class. When i then try to change one of this properties (in this case the text of …

Total answers: 1

Kivy – AttributeError: 'DialogContent' object has no attribute 'manager'

Kivy – AttributeError: 'DialogContent' object has no attribute 'manager' Question: When I close the Dialog Box using the ‘Cancel’ Button or try to add a task using the ‘Save’ button, it creates an attribute error saying that DialogContent doesn’t have an attribute called manager. I wanted to reference the close_dialog or the add_task from my …

Total answers: 1

How to access widgets from another Dynamic Class in kv?

How to access widgets from another Dynamic Class in kv? Question: Is there a way to access a widget from another Dynamic Class in Kivy? I’m trying to trigger some event from a dynamic class which is going to have an effect on a other dynamic class. Here’s an example: Python: from kivy.app import App …

Total answers: 2

KivyMD objects are not centered with pos_hint

KivyMD objects are not centered with pos_hint Question: So in the picture you see that the label and button are at the very end of the screen but i would like that they are both in the middle of their half. Since they are added on a BoxLayout the center of the label has to …

Total answers: 1

How to use ScrollView properly?

How to use ScrollView properly? Question: I’m trying to use ScrollView widget to show multiple lines scroll in the screen. But the lines don’t scroll. The text that should scroll is "myList" label in the screen_second. The idea is to click on button 1, which directs the user to the second screen, and at that …

Total answers: 1

Kivy showing a black screen when trying to use kv file?

Kivy showing a black screen when trying to use kv file? Question: So I want to do the styling of my Kivy app in a external .kv file, but when I run the main code, nothing appears to the black Kivy window. Here’s my main file called main.py import kivy from kivy.app import App from …

Total answers: 2

Showing the setup screen only on first launch in kivy

Showing the setup screen only on first launch in kivy Question: I am trying to make an app with kivy and kivymd but I can’t figure out how I can make the setup screen show up only the first time. This is how the application is going to work: User launches the application after installation …

Total answers: 2