Questions tagged [kivy-language]

A language created and used in the Kivy framework to describe a widget structure of a project.

Kivy language (kv, kvlang) is a language created and used in the Kivy framework to describe a widget structure of a project.

The concept behind kv is to make maintaining mainly the design part of an application simple. Kv provides features that make building an application easy and readable in large projects:

With these features kv allows very fast prototyping and agile changes to User Interface. It also facilitates a good separation between the logic of an application and its UI, therefore provides possibilities to minimize code size and maximize readability.

For real-time debugging of the kv code you can use KivyCatalog.

2724 questions
4
votes
1 answer

Kivy right click menu

I was trying to find a way to enable regular right click in Kivy, but without any luck. I could find a way to disable the multitouch thing with:- Config.set('input', 'mouse', 'mouse,disable_multitouch') But then the right click works just like left…
Eden Ohana
  • 111
  • 2
  • 5
4
votes
1 answer

Can you wrap lines in a kivy file?

I have a couple of lines in my kv. file that are really long (80+ chars), and I was wondering if there was a way to wrap/continue them on the next line. For example, how do I go from this Line: points: self.pos[0] + 5, self.pos[1] + 2,…
user7829260
4
votes
1 answer

Kivy dropdown: can you make it drop "up" instead of "down"?

I have a UI in Kivy with a load of buttons at the bottom of the screen. Ideally I want some of these buttons to be dropdowns but of course since they are at the bottom of the screen, you can't see the dropdown when they are tapped. Is there any way…
Oliver Spencer
  • 2,021
  • 3
  • 16
  • 22
4
votes
1 answer

Kivy - Removing widget by id

I have the following code: from kivy.app import App from kivy.uix.floatlayout import FloatLayout class GUI(FloatLayout): def remove(self): self.remove_widget(self.ids.test) class GUIApp(App): def build(self): return…
null
  • 2,060
  • 3
  • 23
  • 42
4
votes
1 answer

Accessing Kivy layout size in kvlang

I have the following code: from kivy.app import App from kivy.uix.boxlayout import BoxLayout class TestGUI(BoxLayout): pass class TestApp(App): def build(self): return TestGUI() if __name__ == '__main__': …
null
  • 2,060
  • 3
  • 23
  • 42
4
votes
1 answer

Kivy Camera as KV language widget

I am using Kivy with a webcam. I have followed this example by @Arnav of using opencv to form and display the camera as a widget. I have "extended" the layout within python it to add two buttons as a test, in preparation for a more complicated…
tomdertech
  • 497
  • 1
  • 9
  • 27
4
votes
2 answers

Kivy Clipboard.copy label text

I want to copy the content of a Label: self.text when I double tap the label, but the following is not working: main.py #!/usr/bin/kivy # -*- coding: utf-8 -*- from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties…
NumesSanguis
  • 5,832
  • 6
  • 41
  • 76
4
votes
1 answer

Changing Kivy Spinner values dynamically

I´m looking for a way to set the values of a Kivy Spinner depending on the text chosen from the parent spinner. The problem is that I have defined both spinners in kv language. I´m not sure if the approach would be to destroy the second spinner each…
Omar Little
  • 45
  • 1
  • 5
4
votes
3 answers

kivy: firing multiple functions on 1 button click

I have this code and it works, but I'm sure it's not the way to go properly. In my .kv a button fires two functions in my main.py. Button: text: "Press Me" on_release: root.on_our_btn_release(text_input.text) on_release:…
Erik van Elten
  • 405
  • 1
  • 4
  • 10
4
votes
3 answers

How can I make a lot of buttons at dynamic in kv language?

I want to make a lot of Buttons at dynamic in kv language. But now I cannot...... I will show now source under this. BoxLayout: orientation: 'vertical' pos: root.pos size: root.size GridLayout: rows: 2 spacing: 5 …
snow
  • 41
  • 1
  • 5
3
votes
1 answer

Popup in Kivy Python does not get dismissed for more than one time

I have made a popup to show up when an error occurs, with a button that closes the popup when clicked. All worked well until I tried getting an error for 2 times. In the second time the popup did not close and I am wondering if there is a way to…
3
votes
3 answers

kivy app in android with buildozer, terminal loops on "# Waiting for application to start."

I made a sample "hello world" app with kivy and I am trying to put it on an android tablet. I used a virtual machine (Virtual Box) and bulldozer to load it onto the tablet. However, when I run it the terminal, it just prints in a loop # waiting for…
hello234
  • 31
  • 1
  • 3
3
votes
0 answers

Kivy change keyboard layout for different text inputs

I am having a hard time changing between keyboard layouts in my app. In the below example I have two text fields and I want one to use a regular keyboard and the other to use a numberpad keyboard. When I click within one text field the keyboard…
Ginsax
  • 31
  • 2
3
votes
1 answer

Kivy - How to access instance of class created by .kv file?

My class OrderManagementScreen is firstly instantiated by Builder.load_file and then by sm.add_widget(OrderManagementScreen(name='order_management')). I would like to be able to access the instance created by Builder.load_file - how can I do…
Charlie Clarke
  • 177
  • 1
  • 9
3
votes
2 answers

how can i fix this dropdown menu in kivymd?

I'm new on kivy/kivymd and I am trying to create a dropdown menu through the kivymd documentation. However, whenever I click on the dropdown it returns this error to me: AttributeError: 'Box_2' object has no attribute 'menu' I'm not sure what have i…
zupp
  • 96
  • 7