author | Radek Brich <radek.brich@devl.cz> |
Sun, 15 Feb 2015 12:48:23 +0100 | |
changeset 114 | 26c02bd94bd9 |
child 115 | b4ff7392003a |
permissions | -rw-r--r-- |
from .layout import Layout class GridLayout(Layout): """Lay out widgets in a grid. Grid size is determined by each widget's specified column and row. """ def __init__(self): Layout.__init__(self) def add(self, widget, row, column): Layout.add(self, widget) def update(self): for widget in self._managed_widgets: widget.resize(*widget.sizereq) widget.pos.update(*(widget.posreq + self.offset))