summaryrefslogtreecommitdiffstats
path: root/library/demos
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-12-11 18:13:08 (GMT)
committerjenglish <jenglish@flightlab.com>2008-12-11 18:13:08 (GMT)
commitb23f1c5ccb5f2a971132b9348cfa8fbfd5829087 (patch)
tree7d4298babc6ca0316cbf781038ced8ceb74d5eea /library/demos
parentd8ecde2c07db2bec3692edaf1c3b5dcfcaf467f9 (diff)
downloadtk-b23f1c5ccb5f2a971132b9348cfa8fbfd5829087.zip
tk-b23f1c5ccb5f2a971132b9348cfa8fbfd5829087.tar.gz
tk-b23f1c5ccb5f2a971132b9348cfa8fbfd5829087.tar.bz2
library/demos/*.tcl: Omit contraindicated [package require Ttk].
Remove logic that switches [ttk::scrollbar]s to [tk::scrollbar]s based on [tk windowingsystem]; this is already handled in library/ttk/scrollbar.tcl.
Diffstat (limited to 'library/demos')
-rw-r--r--library/demos/combo.tcl3
-rw-r--r--library/demos/mclist.tcl12
-rw-r--r--library/demos/msgbox.tcl3
-rw-r--r--library/demos/toolbar.tcl3
-rw-r--r--library/demos/tree.tcl12
-rw-r--r--library/demos/ttkbut.tcl3
-rw-r--r--library/demos/ttkmenu.tcl3
-rw-r--r--library/demos/ttknote.tcl9
-rw-r--r--library/demos/ttkpane.tcl3
-rw-r--r--library/demos/ttkprogress.tcl3
-rw-r--r--library/demos/widget3
11 files changed, 16 insertions, 41 deletions
diff --git a/library/demos/combo.tcl b/library/demos/combo.tcl
index 521e37b..2545d8b 100644
--- a/library/demos/combo.tcl
+++ b/library/demos/combo.tcl
@@ -2,14 +2,13 @@
#
# This demonstration script creates several combobox widgets.
#
-# RCS: @(#) $Id: combo.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: combo.tcl,v 1.4 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .combo
catch {destroy $w}
diff --git a/library/demos/mclist.tcl b/library/demos/mclist.tcl
index 18d8781..27ea1ea 100644
--- a/library/demos/mclist.tcl
+++ b/library/demos/mclist.tcl
@@ -3,14 +3,13 @@
# This demonstration script creates a toplevel window containing a Ttk
# tree widget configured as a multi-column listbox.
#
-# RCS: @(#) $Id: mclist.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: mclist.tcl,v 1.4 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .mclist
catch {destroy $w}
@@ -29,13 +28,8 @@ pack [addSeeDismiss $w.seeDismiss $w] -side bottom -fill x
ttk::frame $w.container
ttk::treeview $w.tree -columns {country capital currency} -show headings \
-yscroll "$w.vsb set" -xscroll "$w.hsb set"
-if {[tk windowingsystem] ne "aqua"} {
- ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
- ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
-} else {
- scrollbar $w.vsb -orient vertical -command "$w.tree yview"
- scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
-}
+ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
+ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
pack $w.container -fill both -expand 1
grid $w.tree $w.vsb -in $w.container -sticky nsew
grid $w.hsb -in $w.container -sticky nsew
diff --git a/library/demos/msgbox.tcl b/library/demos/msgbox.tcl
index fb986e1..1e09cb5 100644
--- a/library/demos/msgbox.tcl
+++ b/library/demos/msgbox.tcl
@@ -2,14 +2,13 @@
#
# This demonstration script creates message boxes of various type
#
-# RCS: @(#) $Id: msgbox.tcl,v 1.6 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: msgbox.tcl,v 1.7 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .msgbox
catch {destroy $w}
diff --git a/library/demos/toolbar.tcl b/library/demos/toolbar.tcl
index 74a490f..81724eb 100644
--- a/library/demos/toolbar.tcl
+++ b/library/demos/toolbar.tcl
@@ -2,14 +2,13 @@
#
# This demonstration script creates a toolbar that can be torn off.
#
-# RCS: @(#) $Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: toolbar.tcl,v 1.4 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .toolbar
destroy $w
diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl
index b46943a..828560d 100644
--- a/library/demos/tree.tcl
+++ b/library/demos/tree.tcl
@@ -3,14 +3,13 @@
# This demonstration script creates a toplevel window containing a Ttk
# tree widget.
#
-# RCS: @(#) $Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: tree.tcl,v 1.5 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .tree
catch {destroy $w}
@@ -74,13 +73,8 @@ proc populateTree {tree node} {
## Create the tree and set it up
ttk::treeview $w.tree -columns {fullpath type size} -displaycolumns {size} \
-yscroll "$w.vsb set" -xscroll "$w.hsb set"
-if {[tk windowingsystem] ne "aqua"} {
- ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
- ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
-} else {
- scrollbar $w.vsb -orient vertical -command "$w.tree yview"
- scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
-}
+ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
+ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
$w.tree heading \#0 -text "Directory Structure"
$w.tree heading size -text "File Size"
$w.tree column size -stretch 0 -width 70
diff --git a/library/demos/ttkbut.tcl b/library/demos/ttkbut.tcl
index 3d5d3a8..5235cdc 100644
--- a/library/demos/ttkbut.tcl
+++ b/library/demos/ttkbut.tcl
@@ -4,14 +4,13 @@
# simple Ttk widgets, such as labels, labelframes, buttons, checkbuttons and
# radiobuttons.
#
-# RCS: @(#) $Id: ttkbut.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: ttkbut.tcl,v 1.5 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .ttkbut
catch {destroy $w}
diff --git a/library/demos/ttkmenu.tcl b/library/demos/ttkmenu.tcl
index 235b4b1..59a9452 100644
--- a/library/demos/ttkmenu.tcl
+++ b/library/demos/ttkmenu.tcl
@@ -3,14 +3,13 @@
# This demonstration script creates a toplevel window containing several Ttk
# menubutton widgets.
#
-# RCS: @(#) $Id: ttkmenu.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: ttkmenu.tcl,v 1.4 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .ttkmenu
catch {destroy $w}
diff --git a/library/demos/ttknote.tcl b/library/demos/ttknote.tcl
index f7c70a3..5a4e728 100644
--- a/library/demos/ttknote.tcl
+++ b/library/demos/ttknote.tcl
@@ -3,14 +3,13 @@
# This demonstration script creates a toplevel window containing a Ttk
# notebook widget.
#
-# RCS: @(#) $Id: ttknote.tcl,v 1.5 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: ttknote.tcl,v 1.6 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .ttknote
catch {destroy $w}
@@ -55,10 +54,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"
-if {[tk windowingsystem] ne "aqua"} {
- ttk::scrollbar $w.note.editor.s -orient vertical -command "$w.note.editor.t yview"
-} else {
- 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}
diff --git a/library/demos/ttkpane.tcl b/library/demos/ttkpane.tcl
index a99a845..9664ad2 100644
--- a/library/demos/ttkpane.tcl
+++ b/library/demos/ttkpane.tcl
@@ -2,14 +2,13 @@
#
# This demonstration script creates a Ttk pane with some content.
#
-# RCS: @(#) $Id: ttkpane.tcl,v 1.4 2008/06/24 13:37:32 patthoyts Exp $
+# RCS: @(#) $Id: ttkpane.tcl,v 1.5 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .ttkpane
catch {destroy $w}
diff --git a/library/demos/ttkprogress.tcl b/library/demos/ttkprogress.tcl
index 2db6d59..98388b5 100644
--- a/library/demos/ttkprogress.tcl
+++ b/library/demos/ttkprogress.tcl
@@ -2,14 +2,13 @@
#
# This demonstration script creates several progress bar widgets.
#
-# RCS: @(#) $Id: ttkprogress.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: ttkprogress.tcl,v 1.4 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .ttkprogress
catch {destroy $w}
diff --git a/library/demos/widget b/library/demos/widget
index 9182904..e9e2d51 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -10,12 +10,11 @@ exec wish "$0" "$@"
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.
#
-# RCS: @(#) $Id: widget,v 1.51 2008/03/11 22:30:17 das Exp $
+# RCS: @(#) $Id: widget,v 1.52 2008/12/11 18:13:08 jenglish Exp $
package require Tcl 8.5
package require Tk 8.5
package require msgcat
-package require Ttk
eval destroy [winfo child .]
set tk_demoDirectory [file join [pwd] [file dirname [info script]]]