I am writing an app that has a need for the Kivy Color Wheel (https://kivy.org/doc/stable/api-kivy.uix.colorpicker.html) to choose a color value to assign to different users. However, I intend for it to be used on a phone screen, and as such I do not need the various sliders and color codes that make up the second half of the widget –
Tag: kivy-language
How to add a basic parameter to a class in Kivy?
I am using Kivy ScreenLayout and I want to know how to create a basic button which will appear in every Screen. For example: I don’t want to copy and paste the Button in every class, especially when I have more than 20 screens. Is there a way how can be the button added as a basic parameter to every
Kivy: Labels not being displayed in python file with add_widget()
I’m quite new to Kivy and have been repeatedly having issues with displaying things. I am building a basic app to track students, assign them to school houses (like in Harry Potter) and display them. I created a “for” loop to add users to labels in a stack layout which would then display them in a scroll view, but for
KivyMD widgets displaying at the bottom of page in MDBoxLayout
KivyMD widgets are displayed at the bottom when using MDBoxLayout. I remember two MDTextField widgets and one MDRaisedButton, but they are located at the bottom. When using Kivy without KivyMD, there is no such problem. Here is my code: Result: Result of run this code I tried to replace MDBoxLayout to BoxLayout and MDScreen to Screen, but this not helped.
Kivy: AttributeError: ‘…’ object has no attribute ‘…’, but it has
I have this TaskTemplate with some Buttons, TexInput, etc. I will put just a piece of code for an easy understanding. If I use TaskTemplate as root class it works, I can change the state of the CheckBox with that parameter. If I add TaskTemplate here: I get this error which has no end: Answer Your update_state is just an
How to bind the value of a NumericProperty to the Text of a Label?
With Kivy, I understand we can use set the text of a label to a StringProperty() object, so whenever that string is updated, the label will automatically show the updated text. My minimal example code, works fine, will show “apple” then “banana” one second later: Question: How do I do exactly the same, but for a Float? i.e have the
Gridlayout height based on Label height in recycleview not aligned
I have managed to get the size of a box layout to change based on the corresponding Label height, however, it doesn’t line up perfectly and I cannot figure out why. I have looked at adding offsets but have had no luck since it ended up making the issue worse Thank you for any help ^ Image showing how the
how to insert a MDList in a MDDialog in kivyMD?
I need to show the data from a dictionary in a ThreeLineListItem inside a MDDialog, but my code doesn’t seem to work. Here’s my code: Do I need to import the values for the MDList from the KV file? Answer You can’t call your MDDialog class like : DialogContent().check_conflicts(product_dict). You need to reach self.dialog.Because you created this with your custom
Kivy: best way to make a single widget containing different widgets and being able to access their properties in the kv file
I’m trying to make a class that would be a Slider + 2 Labels, one label showing the value of the slider, and one showing the name of the slider. The goal is to reuse this in lieu of Slider when convinient. I am ending up creating properties in the my class MySlider reflecting the ones I am interested in
Interrupting Kivy Toggle Button State Change on Click
I’ve got a toggle button that I’m using to start and stop a process. When the process is being stopped, I have a popup box that comes up, asking the user to enter a password to confirm they want to end the process. Only once the correct password is provided do I want the state of the toggle button to