summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2007-02-25 04:30:30 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2007-02-25 04:30:30 (GMT)
commitb8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf (patch)
treecd64b54644945efba1f91c85a2ea0365cb88415a /tests/grid.test
parent33432c59af4ba34defb03b255dad42030e7db41e (diff)
downloadtk-b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf.zip
tk-b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf.tar.gz
tk-b8d2831d91a1f2014b0bf3398b87d58e0ae5ebcf.tar.bz2
Fixed grid anchor center problem in labelframes. [Bug 1545765]
Diffstat (limited to 'tests/grid.test')
-rw-r--r--tests/grid.test31
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