kivy-language

How to update a texture from array in Kivy?

允我心安 提交于 2019-12-25 01:47:25
问题 I'm new to Kivy, but have watched the tutorials. I want to have a widget containing a texture or image generated from an array, which will change at each frame. See below for what I currently have. Current behaviour is wrong when I resize the window - I think that the old Rectangle is never being deleted, but I can't see how to do that. It also shows the same image in a default (100,100) view at the bottom left of the main window. What do I need to change to achieve the desired behaviour, and

How to limit the number of displayed kivy spinner items

烂漫一生 提交于 2019-12-24 22:42:08
问题 I am am currently using the spinner widget of kivy and i would like to know if there is a way to limit the number of items the spinner shows and scroll to see the rest. For example, i am using a spinner to display all the months, so when i click the spinner, the list reaches the bottom of the window. I would like to see maybe like 5-6 options and scroll to see the rest of them. 回答1: You can use the dropdown_cls.max_size property to specify the maximum height of the drop-down list: from kivy

AttributeError: 'NoneType' object has no attribute 'text' in python

僤鯓⒐⒋嵵緔 提交于 2019-12-24 18:13:27
问题 I am using python-2.7 and kivy .When i run test.py then it gives error AttributeError: 'NoneType' object has no attribute 'text' in python ? Someone tell me what is mistake? test.py import kivy kivy.require('1.9.0') # replace with your current kivy version ! from kivy.uix.screenmanager import Screen from kivy.app import App from kivy.lang import Builder from kivy.core.window import Window from kivy.properties import ObjectProperty Window.size = (500, 230) class GroupScreen(Screen): groupName

Kivy text markup printing its own syntax

痞子三分冷 提交于 2019-12-24 15:40:06
问题 I was testing out Kivy's markup feature. The basic outline of my test program is there are 4 labels and a button and if the button is pressed, it changes the color of the first letter of label's text . Now, the problem is when I press the button for the first time, it changes the color of first letter of all the label's text BUT from the second press onwards, it starts adding the markup syntax in the reverse manner at the beginning of the text. This is the program: from kivy.app import App

KivyMD UI and animations are slow and laggy on Android

帅比萌擦擦* 提交于 2019-12-24 11:52:46
问题 I'm working with KivyMD . The UI is so slow. Animations are so slow and often stuck. Even in the Kitchen Sink example. Although it's fine on my Windows and Linux. The problem is after building package for android. This is exactly my question and the answer given by developer: https://github.com/HeaTTheatR/KivyMD/issues/77 Unfortunately it didn't help and UI is slow main.py: from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import Screen,ScreenManager from kivy

Scrollview to display different videos in kivy lags after a while

杀马特。学长 韩版系。学妹 提交于 2019-12-24 06:42:16
问题 I'm a beginner in kivy and python. I've been trying to create a scrollview in a page that displays selected video on the screen. But after a while when i selected 5-6 videos to display even though i delete the video widget it starts to lag. And i'm open to any suggestions to better way to handle this kind of application. from kivy.config import Config Config.set('graphics', 'width', '1920') Config.set('graphics', 'height', '1080') from kivy.app import App from kivy.lang import Builder from

Kivy Clock and Popup

岁酱吖の 提交于 2019-12-24 06:35:07
问题 How do I properly create active properties for switch_id and switch_id_popup so I can create a conditional statement inside of timer_loop with kivy clock? I got great feedback on a similar question(thanks again eyllanesc), but I am unable to incorporate advice now that popup is involved. Below is a sketch that illustrates my issue. I have identified all of the areas in question with arrows. Thank you in advance for any help. from kivy.app import App from kivy.lang import Builder from kivy

when i click row then it shows error IndexError: list index out of range

纵饮孤独 提交于 2019-12-23 06:16:06
问题 menu.py import kivy kivy.require('1.9.0') # replace with your current kivy version ! import sqlite3 as lite from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties import BooleanProperty, ListProperty, StringProperty, ObjectProperty,NumericProperty from kivy.lang import Builder from kivy.uix.dropdown import DropDown from kivy.uix.recycleview.views import RecycleDataViewBehavior from kivy.uix.button import Button from kivy.uix.recyclegridlayout import

when i click row then it shows error IndexError: list index out of range

时光怂恿深爱的人放手 提交于 2019-12-23 06:15:34
问题 menu.py import kivy kivy.require('1.9.0') # replace with your current kivy version ! import sqlite3 as lite from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties import BooleanProperty, ListProperty, StringProperty, ObjectProperty,NumericProperty from kivy.lang import Builder from kivy.uix.dropdown import DropDown from kivy.uix.recycleview.views import RecycleDataViewBehavior from kivy.uix.button import Button from kivy.uix.recyclegridlayout import

Kivy 'object has no attribute' Error

那年仲夏 提交于 2019-12-19 12:01:54
问题 I'm new to python and Kivy programming so getting trouble and may be asking simple question here, but its a big hurdle for me now. I am developing a GUI with kivy. I have some TextInputs which get numeric value. after all text inputs , I have a 'OK' button which gets all value and process them. I'm getting error in calling the function from same class in .kv file. main.py file: # File name: jwelkreator.py import kivy kivy.require('1.7.0') from kivy.app import App from kivy.lang import Builder