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
3
votes
2 answers

SVG in KV lang file

I'm looking to use an SVG in Kivy, but I'd prefer to do so in a kv file, as opposed to in the py program. However, when I try something such as Widget: canvas.before: Svg: filename: "mySVGFile.svg" I get an ``init() takes…
Pistol Pete
  • 1,027
  • 2
  • 12
  • 25
3
votes
1 answer

How to create a keyboard shortcut (Ctrl + Q) to close Kivy application?

Is there an option to create keyboard shortcut Ex.- Ctrl+Q to exit the application / close the window of a desktop application written in Kivy and Python? I am on Windows OS. Thank you in advance. Arnab
Arnab Majumder
  • 131
  • 1
  • 5
3
votes
2 answers

How do I delete lines from the canvas in kivy

I'm creating a simple drawing application and in it, i'd like to add an undo button. What I have tried so far is this: class DrawScreen(Screen): r = NumericProperty(0) g = NumericProperty(0) b = NumericProperty(0) brush_width =…
Baxorr
  • 298
  • 6
  • 20
3
votes
1 answer

add search filter in kivy

test.py import sqlite3 as lite from kivy.uix.screenmanager import Screen from kivy.app import App from kivy.lang import Builder from kivy.core.window import Window from kivy.uix.popup import Popup from kivy.uix.treeview…
Nirdesh Kumawat
  • 386
  • 2
  • 16
  • 56
3
votes
1 answer

Create a dropdown menu at the top of the window

How to create a dropdown menu at the top of the window (like "File", "Edit", and "Tools") in Kivy?
Nirdesh Kumawat
  • 386
  • 2
  • 16
  • 56
3
votes
1 answer

Can't bind a function to a button

I can't seem to bind my function to this certain button. I have tried this: This is my function: def callback(str): print('he button <%s> is being pressed' % str) and this is where i bind the function: btn = Button(text="%s" %…
xx4xx4
  • 45
  • 7
3
votes
1 answer

Stopping a kivy video

I want to stop this kivy video on tap event(play by default). I'm running this on the raspberry PI. Here's my kv and python code. : name: 'Video' BoxLayout: Video: id: 'video1' source: './media/Sequence_#1.mp4' …
vsr
  • 1,025
  • 9
  • 17
3
votes
1 answer

Reference widget using id in Kivy (kv language)

I have the following in KV language (simplified example): My issue is with the last line (on_release). #:import Factory kivy.factory.Factory : ListView: id: my_listview : Button: …
garlic
  • 197
  • 1
  • 11
3
votes
1 answer

Python Kivy: Dynamic addition of widgets to a screen

What would be a good way to add widgets to a screen from python code (dynamicly)? My goal is to have two 'main' screens. The content of the second screen depends on what has been selected on the Main screen. This content can be seen for simplicity…
Agenobarb
  • 143
  • 2
  • 10
3
votes
1 answer

Unable to select id for animation in Kivy

I have a kv segment that is within my python code. What I want to do is select this button and animate it. The animation itself is triggered by pressing NoButton. NoButton has a class of itself that is child to the root widget class. Unfortunately…
TellMeWhy
  • 315
  • 3
  • 17
3
votes
1 answer

kivy button not perfect square when window is resized

I have created a ScrollView with a GridLayout that has a bunch of buttons. my issue is that I cant get the buttons to be a perfect square when changing the window size. .py file: from kivy.app import App from kivy.uix.label import Label from…
supreme
  • 353
  • 3
  • 14
3
votes
1 answer

kivy reference text of TextInput by StringProperty

I would like to get the text of my TextInput via a StringProperty, but it does not work. I get an empty string. In the second example, I am declaring the whole TextInput as an ObjectProperty and then it does work. What is wrong with my first…
PalimPalim
  • 2,892
  • 1
  • 18
  • 40
3
votes
1 answer

Place Graph on Kivy as a Widget with Button

I want to put a graph that self updates. So when I press a Kivy button on my GUI script written with Python and it's supposed to take me to a Screen. The Screen has a graph on a part of the Screen and buttons on the rest of the screen. However, I…
3
votes
3 answers

Enable only four line in text Input in Kivy

I am new in Kivy programming. I want to enable only 4 lines in text Input in Kivy. I can use either only one line either multi lines, but I want a text field which has enabled only 4 lines. In short I want a text field where i can enter anything…
Akash D G
  • 177
  • 1
  • 6
  • 18
3
votes
1 answer

How do you make a window full screen using the kivy design language?

Can someone tell me how to set a kivy window to full screen mode using the design language? The result I'm looking for is either bordered full screen/border-less full screen. If you run the following example you'll see exactly what I'm trying to…
suroh
  • 917
  • 1
  • 10
  • 26