summaryrefslogtreecommitdiffstats
path: root/tests/grid.test
diff options
context:
space:
mode:
authorpeter.spjuth@gmail.com <pspjuth>2007-02-25 04:30:30 (GMT)
committerpeter.spjuth@gmail.com <pspjuth>2007-02-25 04:30:30 (GMT)
commit5d36908d682240529e6c04fd061cad8855457aa6 (patch)
treecd64b54644945efba1f91c85a2ea0365cb88415a /tests/grid.test
parentd2c0db23c724102532be6ecc4b0684e60d73e032 (diff)
downloadtk-5d36908d682240529e6c04fd061cad8855457aa6.zip
tk-5d36908d682240529e6c04fd061cad8855457aa6.tar.gz
tk-5d36908d682240529e6c04fd061cad8855457aa6.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