Skip to content
Advertisement

Display Kivy canvas inside GridLayout

I am trying to reference to Canvas within GridLayout with just drawing simple rectangle before further development. Code:

main.py:

JavaScript

my.py

JavaScript

After running i get error:

JavaScript

I am new in kivy, so any help is appreciated.

After solving this issue, I am planning to run custom python func , run under button calc, and return calculated results on canvas. Func results are 2d line points, hence plotting of results on canvas is goal here.

Advertisement

Answer

Change:

JavaScript

to:

JavaScript

to put the canvas: instruction before the children.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement