Skip to content
Advertisement

Kivy GridLayout Error : have no cols or rows set, layout is not triggered

I’m trying to make a simple app that takes name, grade, language (just for practice).

Here’s the Code:

JavaScript

Although it runs I get the layout all wrong and just the button on the screen with following error:

[WARNING] <kivy.uix.gridlayout.GridLayout object at 0x04254108> have no cols or rows set, layout is not triggered.

Output Window image

Advertisement

Answer

You are getting that error because you are not setting cols or rows for a GridLayout. In this case, the GridLayout in question is the one created by:

JavaScript

The fix is to set cols or rows for that GridLayout. Try adding a line like:

JavaScript

just after creating self.top_grid.

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