kivy-language

Main KV File cant be found in Pyinstaller exe

我与影子孤独终老i 提交于 2021-02-11 14:48:05
问题 I'm at my wits end here... So I have a kivy app that runs fine from the interpreter and fine when built as a directory. But it doesn't seem to matter how I build it, the resulting exe always fails to find my main.kv file. My file structure is that I basically have images and a bunch of screens. main.py main.kv resources/image 1 /image 2 /kv_files/screen1 /screen2 I have been over all the similar question on SO including this one, and this one and this one. I think I have tried all of the

Label keeps running off edge of ScrollView screen x axis Kivy

我怕爱的太早我们不能终老 提交于 2021-02-11 13:50:10
问题 I'm creating a chat screen, adding a Label to my GridLayout everytime the send button is pressed. However, my Labels run off the side of the screen when the text becomes too long, I would like them to wrap round and the text to go onto a new line but this isn't happening and I'm not sure why. <ChatPage>: name: "chat_page" layout_content: layout_content NavigationLayout: id: nav_layout MDNavigationDrawer: NavigationDrawerIconButton: text: "Test" on_release: app.root.current = "login"

How to put multiple columns into a kivy RecycleView?

柔情痞子 提交于 2021-02-11 06:01:47
问题 I want to put the data of a (csv-)table into a kivy recycleview. I managed to insert multiple columns with one row, if i assign a fixed text to the Labels in the kv, but i can't get it to fill the labels with data from a dictionary list. This is the code so far, that i use to test the concept: from kivy.app import App from kivy.lang import Builder from kivy.uix.recycleview import RecycleView from kivy.uix.boxlayout import BoxLayout import csv items = [{'SP1': 'Artikelnummer', 'SP2': 'Name',

How to put multiple columns into a kivy RecycleView?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 06:01:35
问题 I want to put the data of a (csv-)table into a kivy recycleview. I managed to insert multiple columns with one row, if i assign a fixed text to the Labels in the kv, but i can't get it to fill the labels with data from a dictionary list. This is the code so far, that i use to test the concept: from kivy.app import App from kivy.lang import Builder from kivy.uix.recycleview import RecycleView from kivy.uix.boxlayout import BoxLayout import csv items = [{'SP1': 'Artikelnummer', 'SP2': 'Name',

How to select kivy old value for the spinner

痞子三分冷 提交于 2021-02-10 14:27:49
问题 Kivy documentation states that "Touching the spinner displays a dropdown menu with all the other available values from which the user can select a new one." Is there any workaround to tell if it is an old value a user selected in order to perform the same action? I am really stuck with this, please help me out. 回答1: Rather than using the on_text or on_select , you can use the Buttons that make up the DropDown to trigger whatever method you want to run. That way, it doesn't matter whether the

python and kivy input text in first windows after click button print ( text ) as label ( update label ) in second widows

十年热恋 提交于 2021-02-08 11:37:49
问题 I want create simple app and I'm new in python, this app contain two windows , at first windows have one button (Save) and two input text. at the second windows we have four label. after click on button in first windows the label ( username 1 print here ) in second windows change according text input in first windows.enter image description here enter image description here when I run my code the label not change, any one can help me what is wrong. python code from kivy.app import App from

How to deploy a PyCharm project with Kivy and mapview?

半城伤御伤魂 提交于 2021-02-08 10:25:12
问题 I want to deploy a Python Project with Kivy and a MapView. I develop with PyCharm and when I run my project with it, everything works well. I also tried to compile and run my project with the python IDLE, it also works good ! I followed the instructions of PyInstaller (https://www.pyinstaller.org/#pyinstaller-quickstart) and the folders were created. The problem is that my .exe file doesn't works... A cmd window is opened but it's immediately closed.. If you need more explanation, just let me

Kivy - Removing widget by id

此生再无相见时 提交于 2021-02-07 09:14:06
问题 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 GUI() if __name__ == '__main__': GUIApp().run() And the corresponding kv file: #:kivy 1.9.1 <GUI>: BoxLayout: Button: id: test text: 'Test' on_press: root.remove() The button should be removed when clicked. However, this does not happen. If I remove the BoxLayout in the kv file,

Kivy - Removing widget by id

点点圈 提交于 2021-02-07 09:12:36
问题 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 GUI() if __name__ == '__main__': GUIApp().run() And the corresponding kv file: #:kivy 1.9.1 <GUI>: BoxLayout: Button: id: test text: 'Test' on_press: root.remove() The button should be removed when clicked. However, this does not happen. If I remove the BoxLayout in the kv file,

Is there a focus lost event dispatcher for a kivy TextInput?

扶醉桌前 提交于 2021-01-29 13:34:34
问题 Problem: Is there a way to fire an event if a multiline = True TextInput lost its focus? Background: I have tried on_touch_up function. But it returns the instances of all my TextInputs , not just the current widget. I tried text_validate_unfocus = False , with the same result. Code: import kivy kivy.require("1.10.1") from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.properties import ObjectProperty, NumericProperty from kivy.uix.textinput import TextInput from