diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/grid.test | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/tests/grid.test b/tests/grid.test index 0d8129a..0bdcf58 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: grid.test,v 1.28 2006/04/11 21:52:20 pspjuth Exp $ +# RCS: @(#) $Id: grid.test,v 1.29 2007/02/25 04:30:31 pspjuth Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -1922,6 +1922,35 @@ test grid-21.6 {anchor} { {37 50 225 150}] grid_reset 21.6 +test grid-21.7 {anchor} { + # Test with a non-symmetric internal border. + # This only tests vertically, there is currently no way to get + # it assymetric horizontally. + labelframe .f -bd 0 + frame .f.x -width 20 -height 20 + .f configure -labelwidget .f.x + pack .f -fill both -expand 1 + + foreach i {0 1 2} { + frame .$i -bg gray -width 75 -height 50 -bd 2 -relief ridge + grid .$i -in .f -row $i -column $i -sticky nswe + } + pack propagate . 0 + grid propagate .f 0 + . configure -width 300 -height 250 + + set res {} + foreach a {n ne e se s sw w nw center} { + grid anchor .f $a + update + lappend res [grid bbox .f] + } + set res +} [list {37 20 225 150} {75 20 225 150} {75 60 225 150} {75 100 225 150} \ + {37 100 225 150} {0 100 225 150} {0 60 225 150} {0 20 225 150} \ + {37 60 225 150}] +grid_reset 21.7 + # cleanup cleanupTests return |