Answer the question
In order to leave comments, you need to log in
Why does the function call cause an error?
gl = GridLayout(orientation= 'lr-tb', padding=[0, 100, 0, 0], cols = 3)
def BoxOneP():
box1 = gl.add_widget( Button(text="Ячейка 2"))
box1 = gl.add_widget( Button(text="Ячейка 1", on_press = BoxOneP() ))
Answer the question
In order to leave comments, you need to log in
> on_press = BoxOneP ()
You assign the on_press parameter to the result of calling the BoxOneP function. Which returns None.
Maybe they just meant "on_press=BoxOneP" after all?
And yes, what does "breaks the application" mean? The text of the error with a stack trace from the studio.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question