Kivy question | Sololearn: Learn to code for FREE!


Kivy question

How can i name a canvas? Like with Widget().canvas: Widget().something = Rectangle(...) And so i have to return Widget() but if it have two canvas in the same class how will i do it?

11/16/2018 12:29:25 PM

I Am (Not) Arthur!

1 Answer

New Answer


I don't think it's possible to create multiple canvas in the same class. It'll always return the last canvas created. Rather we can create a canvas and can draw anything on it. Speaking of canvas, I think it's easy and more readable to write it in the kv file.