[Solved] Can I design a button like the one given in pic using Kivy? [closed]

Are the above things possible with Kivy? The answer is simply ‘yes’. Do you have a specific context that you’re having trouble with? You simply need to create your own widget rule that displays things the way you want. It might start as something like <YourRule@BoxLayout>: text: ‘something’ # define a property to hold the … Read more

[Solved] AttributeError: ‘NoneType’ object has no attribute ‘current’

At the moment you call: print self,self.parent.current the LoginScreen is not instantiated yet, so you are calling for and object that does not exist. The workaround is to delay the call by 1 frame, that can be done using Clock class: Clock.schedule_once(self._myprintfunction, 1/60) and latter in your code but in the same class: def _myprintfunction(self, … Read more

[Solved] kivy capture mouse coordinates outside of window

Use from kivy.utils import platform to get the platform the app is being run on. Then, for windows: flags, hcursor, (x,y) = win32gui.GetCursorInfo() for Linux distros, use: from Xlib import display data = display.Display().screen().root.query_pointer()._data data[“root_x”], data[“root_y”] 1 solved kivy capture mouse coordinates outside of window

[Solved] Float comparison (1.0 == 1.0) always false

As others have stated, the problem is due to the way floating point numbers are stored. While you could try to use workarounds, there’s a better way to do this: Animation. In __init__: self.grid.opacity = 0 anim = Animation(opacity=1) anim.start(self.grid) solved Float comparison (1.0 == 1.0) always false

[Solved] How can you initialise an instance in a Kivy screen widget

You have two __init__() methods in ProfileWindow. The second redefines, overwriting the first, and does not create the localId attribute. Your one and only __init__() method in ProfileWindow should be: def __init__(self, **kwargs): super(ProfileWindow, self).__init__(**kwargs) self.localId = None The next problem is that you are creating 3 instances of ProfileWindow. You only need one. So … Read more

[Solved] Display and play audio files

Here is a simple example of how to show all 3gp files in your current directory. from kivy.app import App from kivy.uix.filechooser import FileChooserListView from kivy.uix.boxlayout import BoxLayout class MyLayout(BoxLayout): def __init__(self,**kwargs): super(MyLayout,self).__init__(**kwargs) self.fclv = FileChooserListView(path=”.”, filters= [‘*.3gp’]) self.add_widget(self.fclv) class MyApp(App): def build(self): return MyLayout() MyApp().run() Result is: 2 solved Display and play audio files