def update_layout(self): Container.update_layout(self) total = self.padding for c in self.children[::-1]: c.y = total total += c.h + self.padding self._h = total