Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a widget span multiple columns/rows in gridlayout in kivy

I would like to create an app in kivy with widgets in a grid and I want to be able to set some widgets to be larger - to occupy more than one cell in a grid.

GridLayout seems the most appropriate, but it seems to not support placing widgets in more than one cell.

To be more specific I want behavour similar to the grid geometry manager from Tkinter, when setting columnspan or rowspan to more than 1.

Like this:

(widget)(widget)(widget)
( bigger widget )(widget)
...

I would prefer to be able to do this using existing kivy layouts instead of having to write my own layout class to handle this, but if no other option is possible, this is also ok.

like image 663
user3299143 Avatar asked Feb 11 '14 22:02

user3299143


1 Answers

Another option here is to have a GridLayout with 1 column and populate each row with a BoxLayout with orientation="horizontal". You can then format each BoxLayout (row) as you want.

For more info on the BoxLayout: http://kivy.org/docs/api-kivy.uix.boxlayout.html

like image 74
ZenCODE Avatar answered Sep 30 '22 01:09

ZenCODE