From 54d95efb1b0af2bb5515b00e30736e5a49b92b1a Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 1 Nov 2007 16:36:37 +0000 Subject: Better resizing behaviour. [Bug 1822601] --- ChangeLog | 4 ++++ library/demos/textpeer.tcl | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cb7a89..d74509b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-01 Donal K. Fellows + + * library/demos/textpeer.tcl: Better resizing. [Bug 1822601] + 2007-11-01 Donal K. Fellows * doc/colors.n: Added list of Windows system colors. [Bug 945409] diff --git a/library/demos/textpeer.tcl b/library/demos/textpeer.tcl index 0dd23f3..0b6e484 100644 --- a/library/demos/textpeer.tcl +++ b/library/demos/textpeer.tcl @@ -4,7 +4,7 @@ # single logical buffer. This is particularly useful when editing related text # in two (or more) parts of the same file. # -# RCS: @(#) $Id: textpeer.tcl,v 1.1 2007/10/15 21:06:17 dkf Exp $ +# RCS: @(#) $Id: textpeer.tcl,v 1.2 2007/11/01 16:36:38 dkf Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -21,6 +21,7 @@ positionWindow $w set count 0 +## Define a widget that we peer from; it won't ever actually be shown though set first [text $w.text[incr count]] $first insert end "This is a coupled pair of text widgets; they are peers to " $first insert end "each other. They have the same underlying data model, but " @@ -30,8 +31,9 @@ $first insert end "create additional peers of any of these text widgets using " $first insert end "the Make Peer button beside the text widget to clone, and " $first insert end "delete a particular peer widget using the Delete Peer " $first insert end "button." -grid $first +## Procedures to make and kill clones; most of this is just so that the demo +## looks nice... proc makeClone {w parent} { global count set t [$parent peer create $w.text[incr count] -yscroll "$w.sb$count set"\ @@ -52,9 +54,11 @@ proc killClone {w count} { destroy $w.clone$count $w.kill$count } +## Now set up the GUI makeClone $w $first makeClone $w $first destroy $first ## See Code / Dismiss buttons grid [addSeeDismiss $w.buttons $w] - - -sticky ew -row 5000 +grid columnconfigure $w 0 -weight 1 -- cgit v0.12