diff options
author | hobbs <hobbs> | 2007-10-30 01:57:54 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2007-10-30 01:57:54 (GMT) |
commit | b8d5cb3dc1cfd00eed4e1b1e232251019a43f0b6 (patch) | |
tree | 7041a42b48870bc050d2aea2eaee9195e8291e9e /library/demos/floor.tcl | |
parent | 6ec3e0445837fcebbb70b19d8affb34c92c5646e (diff) | |
download | tk-b8d5cb3dc1cfd00eed4e1b1e232251019a43f0b6.zip tk-b8d5cb3dc1cfd00eed4e1b1e232251019a43f0b6.tar.gz tk-b8d5cb3dc1cfd00eed4e1b1e232251019a43f0b6.tar.bz2 |
* tests/listbox.test, tests/panedwindow.test, tests/scrollbar.test:
* library/bgerror.tcl, library/dialog.tcl, library/listbox.tcl:
* library/msgbox.tcl, library/optMenu.tcl, library/tclIndex:
* library/tkfbox.tcl, library/demos/floor.tcl, library/demos/rmt:
* library/demos/tcolor, library/demos/text.tcl:
* library/demos/twind.tcl, library/demos/widget: Buh-bye Motif look
* library/ttk/fonts.tcl: Update of Tk default look in 8.5
* macosx/tkMacOSXDefault.h: Trims border sizes, cleaner X11 look
* unix/tkUnixDefault.h: with minor modifications for Win32/Aqua.
* win/tkWinDefault.h: Uses Tk*Font definitions throughout for
* win/tkWinFont.c: classic widgets. [Bug #1820344]
* library/obsolete.tcl (::tk::classic::restore): This restores
changes made to defaults in 8.5 using the 'option' command,
segmented into logical groups.
Diffstat (limited to 'library/demos/floor.tcl')
-rw-r--r-- | library/demos/floor.tcl | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/library/demos/floor.tcl b/library/demos/floor.tcl index 5784db3..f1004b5 100644 --- a/library/demos/floor.tcl +++ b/library/demos/floor.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a canvas widet that displays the # floorplan for DEC's Western Research Laboratory. # -# RCS: @(#) $Id: floor.tcl,v 1.6 2004/12/21 11:56:35 dkf Exp $ +# RCS: @(#) $Id: floor.tcl,v 1.7 2007/10/30 01:57:54 hobbs Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -1309,28 +1309,26 @@ pack $btns -side bottom -fill x set f [frame $w.frame] pack $f -side top -fill both -expand yes -set h [scrollbar $f.hscroll -highlightthickness 0 -orient horizontal] -set v [scrollbar $f.vscroll -highlightthickness 0 -orient vertical] -set f1 [frame $f.f1 -bd 2 -relief sunken] -set c [canvas $f1.c -width 900 -height 500 -borderwidth 0 \ - -highlightthickness 0 -xscrollcommand "$h set" -yscrollcommand "$v set"] +set h [scrollbar $f.hscroll -orient horizontal] +set v [scrollbar $f.vscroll -orient vertical] +set f1 [frame $f.f1 -borderwidth 2 -relief sunken] +set c [canvas $f1.c -width 900 -height 500 -highlightthickness 0 \ + -xscrollcommand [list $h set] \ + -yscrollcommand [list $v set]] pack $c -expand yes -fill both -grid $f1 -padx 1 -pady 1 \ - -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news -grid $v -padx 1 -pady 1 \ - -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news -grid $h -padx 1 -pady 1 \ - -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news +grid $f1 -padx 1 -pady 1 -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news +grid $v -padx 1 -pady 1 -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news +grid $h -padx 1 -pady 1 -row 1 -column 0 -rowspan 1 -columnspan 1 -sticky news grid rowconfig $f 0 -weight 1 -minsize 0 grid columnconfig $f 0 -weight 1 -minsize 0 pack $f -expand yes -fill both -padx 1 -pady 1 -$v config -command "$c yview" -$h config -command "$c xview" +$v configure -command [list $c yview] +$h configure -command [list $c xview] # Create an entry for displaying and typing in current room. -entry $c.entry -width 10 -relief sunken -bd 2 -textvariable currentRoom +entry $c.entry -width 10 -textvariable currentRoom # Choose colors, then fill in the floorplan. |