right sizing cells in a Gridlayout ( SOLVED).....or worked around at least

8 views
Skip to first unread message

j colo

unread,
Jun 20, 2018, 5:33:00 AM6/20/18
to Kivy users support


Hi,

I was facing the problem that I was unable to size the cells of my gridlayout. Tons of space around my text. My issue was really with height.

This was limiting the amount of stuff I was able to show.

Tried many solutions from the manual and forums. I never found ( understood) a combination of size, size_hint, texture_size etc that would actually work. My bad.

Googling I saw  comments on an old github  issue that solved my problems

use  size_hint: (your choice, your choice)  **AND**
        size:self.texture_size


I do not know if this is a workaround or the right solution. The thread in github was challenging this as inflexible...thought it solves my problem.

FYI

JC

j colo

unread,
Jun 20, 2018, 6:22:14 AM6/20/18
to Kivy users support


actually the example code in scrollview manual solves the problem as well, probably in the right way.

See the line btn=Button(text=str(i), size_hint_y=None, height=40)
Reply all
Reply to author
Forward
0 new messages