How to bind in kivy ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to bind in kivy ?

well I m writing an app where I have a Label . so I need to set the text_size = [self.width,None] but inside a python code I can t do it like that so I write label.bind(width=label.setter("text_size[0]")) but it show me a keyerror about "text_size[0]". how can I do it inside python code ?

17th Jan 2017, 7:24 PM
mohammad ammar
mohammad ammar - avatar
3 Answers
+ 3
Why the double quotes inside method argument?
22nd Jan 2017, 7:31 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 3
in kivy documentation they wrote about using setter methode . use :instace.setter('name')
22nd Jan 2017, 7:42 PM
mohammad ammar
mohammad ammar - avatar
+ 2
I'll look into it. Right now I'm digging into pyglet. Kivy seems too powerful for my current project :)
22nd Jan 2017, 10:32 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar