--- a/demo_layout.py Thu Jan 10 00:03:34 2013 +0100
+++ b/demo_layout.py Fri Jan 18 22:36:50 2013 +0100
@@ -10,12 +10,11 @@
class MyApplication(Application):
def __init__(self):
Application.__init__(self)
+
+ self.top = VerticalLayout(homogeneous=False)
self.top.add_handler('keypress', self.on_top_keypress)
-
#self.top.borders = (1,1,1,1)
- self.top.layout = VerticalLayout(homogeneous=False)
-
self._row_num = 0
self.buildrow()
self.buildrow(expand=True)
@@ -26,9 +25,8 @@
self.buildrow(homogeneous=True, fill=True, spacing=2)
def buildrow(self, homogeneous=False, spacing=0, expand=False, fill=False):
- hbox = Container()
- hbox.sizereq.h = 2
- hbox.layout = HorizontalLayout(homogeneous=homogeneous, spacing=spacing)
+ hbox = HorizontalLayout(homogeneous=homogeneous, spacing=spacing)
+ hbox.resize(h=2)
self._row_num += 1
hbox.name = 'hbox' + str(self._row_num)
self.top.add(hbox)