diff options
author | dgp <dgp@users.sourceforge.net> | 2007-11-02 14:51:39 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-11-02 14:51:39 (GMT) |
commit | 9d5c1ed7b432d032a20a92a500639fd69160ee6a (patch) | |
tree | bfb89fa15217bfa4ef27b75736c50d248343bf61 /library/demos | |
parent | 0241933d2fcf1a09145b33048c52e40988a8bfa9 (diff) | |
download | tk-9d5c1ed7b432d032a20a92a500639fd69160ee6a.zip tk-9d5c1ed7b432d032a20a92a500639fd69160ee6a.tar.gz tk-9d5c1ed7b432d032a20a92a500639fd69160ee6a.tar.bz2 |
merge updates from HEAD
Diffstat (limited to 'library/demos')
-rw-r--r-- | library/demos/sayings.tcl | 6 | ||||
-rw-r--r-- | library/demos/textpeer.tcl | 8 | ||||
-rw-r--r-- | library/demos/ttknote.tcl | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/library/demos/sayings.tcl b/library/demos/sayings.tcl index c6066ce..a95f287 100644 --- a/library/demos/sayings.tcl +++ b/library/demos/sayings.tcl @@ -4,7 +4,7 @@ # both horizontally and vertically. It displays a collection of # well-known sayings. # -# RCS: @(#) $Id: sayings.tcl,v 1.4 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: sayings.tcl,v 1.4.2.1 2007/11/02 14:51:39 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -27,7 +27,7 @@ set btns [addSeeDismiss $w.buttons $w] pack $btns -side bottom -fill x frame $w.frame -borderwidth 10 -pack $w.frame -side top -expand yes -fill y +pack $w.frame -side top -expand yes -fill both -padx 1c scrollbar $w.frame.yscroll -command "$w.frame.list yview" @@ -43,4 +43,4 @@ grid rowconfig $w.frame 0 -weight 1 -minsize 0 grid columnconfig $w.frame 0 -weight 1 -minsize 0 -$w.frame.list insert 0 "Waste not, want not" "Early to bed and early to rise makes a man healthy, wealthy, and wise" "Ask not what your country can do for you, ask what you can do for your country" "I shall return" "NOT" "A picture is worth a thousand words" "User interfaces are hard to build" "Thou shalt not steal" "A penny for your thoughts" "Fool me once, shame on you; fool me twice, shame on me" "Every cloud has a silver lining" "Where there's smoke there's fire" "It takes one to know one" "Curiosity killed the cat" "Take this job and shove it" "Up a creek without a paddle" "I'm mad as hell and I'm not going to take it any more" "An apple a day keeps the doctor away" "Don't look a gift horse in the mouth" +$w.frame.list insert 0 "Don't speculate, measure" "Waste not, want not" "Early to bed and early to rise makes a man healthy, wealthy, and wise" "Ask not what your country can do for you, ask what you can do for your country" "I shall return" "NOT" "A picture is worth a thousand words" "User interfaces are hard to build" "Thou shalt not steal" "A penny for your thoughts" "Fool me once, shame on you; fool me twice, shame on me" "Every cloud has a silver lining" "Where there's smoke there's fire" "It takes one to know one" "Curiosity killed the cat" "Take this job and shove it" "Up a creek without a paddle" "I'm mad as hell and I'm not going to take it any more" "An apple a day keeps the doctor away" "Don't look a gift horse in the mouth" "Measure twice, cut once" diff --git a/library/demos/textpeer.tcl b/library/demos/textpeer.tcl index 9a1a985..000f07a 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.2.2 2007/10/16 04:03:54 dgp Exp $ +# RCS: @(#) $Id: textpeer.tcl,v 1.1.2.3 2007/11/02 14:51:40 dgp 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 diff --git a/library/demos/ttknote.tcl b/library/demos/ttknote.tcl index dc2bf71..d4e5511 100644 --- a/library/demos/ttknote.tcl +++ b/library/demos/ttknote.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a toplevel window containing a Ttk # notebook widget. # -# RCS: @(#) $Id: ttknote.tcl,v 1.2.2.2 2007/10/24 12:59:33 dgp Exp $ +# RCS: @(#) $Id: ttknote.tcl,v 1.2.2.3 2007/11/02 14:51:40 dgp Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -55,6 +55,6 @@ ttk::frame $w.note.editor $w.note add $w.note.editor -text "Text Editor" -underline 0 text $w.note.editor.t -width 40 -height 10 -wrap char \ -yscroll "$w.note.editor.s set" -scrollbar $w.note.editor.s -orient vertical -command "$w.note.editor.t yview" +ttk::scrollbar $w.note.editor.s -orient vertical -command "$w.note.editor.t yview" pack $w.note.editor.s -side right -fill y -padx {0 2} -pady 2 pack $w.note.editor.t -fill both -expand 1 -pady 2 -padx {2 0} |