tests/gridlayout.py
changeset 19 5e78d52ebb24
parent 6 d4ee152d7d07
--- a/tests/gridlayout.py	Fri Oct 07 11:07:59 2011 +0200
+++ b/tests/gridlayout.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, Size, Widget, GridLayout
 
 # -------------
 # | 0 | 1 | 2 |
@@ -22,10 +25,10 @@
         w[i] = Widget()
         cont.add(w[i])
 
-    w[3].layouthints['colspan'] = 2
+    w[3].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
@@ -52,7 +55,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:')
@@ -60,3 +63,4 @@
 
     print('rowminh:')
     print(grid._rowminh)
+