tests/gridlayout_rowspan.py
changeset 19 5e78d52ebb24
parent 11 762513aacc87
--- a/tests/gridlayout_rowspan.py	Fri Oct 07 11:07:59 2011 +0200
+++ b/tests/gridlayout_rowspan.py	Fri Oct 07 12:02:33 2011 +0200
@@ -1,7 +1,10 @@
 #!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
-from tuikit import *
+import sys
+sys.path.append('..')
+
+from tuikit import Container, Widget, Size, GridLayout
 
 # +---+---+---+
 # | 0     | 1 |
@@ -23,10 +26,10 @@
         w[i] = Widget()
         cont.add(w[i])
 
-    w[0].layouthints['colspan'] = 2
+    w[0].hints['colspan'] = 2
 
-    w[1].sizemin = (2,2)
-    w[3].sizemin = (6,1)
+    w[1].sizemin = Size(2,2)
+    w[3].sizemin = Size(6,1)
 
     grid = GridLayout(3)
     grid.container = cont
@@ -53,7 +56,7 @@
             if w is None:
                 print('[0,0]', end=' ')
             else:
-                print('[%d,%d]' % w.sizemin, end=' ')
+                print('[{0.w},{0.h}]'.format(w.sizemin), end=' ')
         print()
 
     print('colminw:')
@@ -61,3 +64,4 @@
 
     print('rowminh:')
     print(grid._rowminh)
+