summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/demos/mclist.tcl4
-rw-r--r--library/demos/tree.tcl4
-rw-r--r--library/demos/ttknote.tcl8
-rw-r--r--library/demos/widget17
4 files changed, 16 insertions, 17 deletions
diff --git a/library/demos/mclist.tcl b/library/demos/mclist.tcl
index ed2f55a..6562117 100644
--- a/library/demos/mclist.tcl
+++ b/library/demos/mclist.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a toplevel window containing a Ttk
# tree widget configured as a multi-column listbox.
#
-# RCS: @(#) $Id: mclist.tcl,v 1.1 2007/11/02 23:48:11 dkf Exp $
+# RCS: @(#) $Id: mclist.tcl,v 1.2 2007/11/04 10:38:09 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -20,7 +20,7 @@ wm iconname $w "mclist"
positionWindow $w
## Explanatory text
-ttk::label $w.msg -font $font -wraplength 4i -justify left -anchor n -text "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which can be configured to display multiple columns of informational data without displaying the tree itself. This is a simple way to build a listbox that has multiple columns. Clicking on the heading for a column will sort the data by that column. You can also change the width of the columns by dragging the boundary between them."
+ttk::label $w.msg -font $font -wraplength 4i -justify left -anchor n -padding {10 2 10 6} -text "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which can be configured to display multiple columns of informational data without displaying the tree itself. This is a simple way to build a listbox that has multiple columns. Clicking on the heading for a column will sort the data by that column. You can also change the width of the columns by dragging the boundary between them."
pack $w.msg -fill x
## See Code / Dismiss
diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl
index 80f9612..d0af6a7 100644
--- a/library/demos/tree.tcl
+++ b/library/demos/tree.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a toplevel window containing a Ttk
# tree widget.
#
-# RCS: @(#) $Id: tree.tcl,v 1.2 2007/10/23 06:31:16 das Exp $
+# RCS: @(#) $Id: tree.tcl,v 1.3 2007/11/04 10:38:09 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -20,7 +20,7 @@ wm iconname $w "tree"
positionWindow $w
## Explanatory text
-ttk::label $w.msg -font $font -wraplength 4i -justify left -anchor n -text "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which allows the user to browse a hierarchical data-set such as a filesystem. The tree widget not only allows for the tree part itself, but it also supports an arbitrary number of additional columns which can show additional data (in this case, the size of the files found in your filesystem). You can also change the width of the columns by dragging the boundary between them."
+ttk::label $w.msg -font $font -wraplength 4i -justify left -anchor n -padding {10 2 10 6} -text "Ttk is the new Tk themed widget set. One of the widgets it includes is a tree widget, which allows the user to browse a hierarchical data-set such as a filesystem. The tree widget not only allows for the tree part itself, but it also supports an arbitrary number of additional columns which can show additional data (in this case, the size of the files found in your filesystem). You can also change the width of the columns by dragging the boundary between them."
pack $w.msg -fill x
## See Code / Dismiss
diff --git a/library/demos/ttknote.tcl b/library/demos/ttknote.tcl
index 397de24..c737d3a 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.3 2007/11/02 14:28:24 dkf Exp $
+# RCS: @(#) $Id: ttknote.tcl,v 1.4 2007/11/04 10:38:09 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -55,6 +55,10 @@ 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"
-ttk::scrollbar $w.note.editor.s -orient vertical -command "$w.note.editor.t yview"
+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"
+}
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/widget b/library/demos/widget
index 5155875..47d97d7 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -10,7 +10,7 @@ exec wish "$0" "$@"
# separate ".tcl" files is this directory, which are sourced by this script as
# needed.
#
-# RCS: @(#) $Id: widget,v 1.46 2007/11/02 23:53:07 dkf Exp $
+# RCS: @(#) $Id: widget,v 1.47 2007/11/04 10:38:09 das Exp $
package require Tcl 8.5
package require Tk 8.5
@@ -103,19 +103,14 @@ image create photo ::img::new -format GIF -data [mc {
menu .menuBar -tearoff 0
-# On the Mac use the special .apple menu for the about item
-if {[tk windowingsystem] eq "aqua"} {
- .menuBar add cascade -menu .menuBar.apple
- menu .menuBar.apple -tearoff 0
- .menuBar.apple add command -label [mc "About..."] -command {aboutBox}
-} else {
+if {[tk windowingsystem] ne "aqua"} {
# This is a tk-internal procedure to make i18n easier
::tk::AmpMenuArgs .menuBar add cascade -label [mc "&File"] \
-menu .menuBar.file
menu .menuBar.file -tearoff 0
::tk::AmpMenuArgs .menuBar.file add command -label [mc "&About..."] \
- -command {aboutBox} -accelerator [mc "<F1>"]
- bind . <F1> {aboutBox}
+ -command {tkAboutDialog} -accelerator [mc "<F1>"]
+ bind . <F1> {tkAboutDialog}
.menuBar.file add sep
if {[string match win* [tk windowingsystem]]} {
# Windows doesn't usually have a Meta key
@@ -718,11 +713,11 @@ proc PrintTextWin32 {filename} {
eval exec $command
}
-# aboutBox --
+# tkAboutDialog --
#
# Pops up a message box with an "about" message
#
-proc aboutBox {} {
+proc tkAboutDialog {} {
tk_messageBox -icon info -type ok -title [mc "About Widget Demo"] \
-message [mc "Tk widget demonstration application"] -detail \
"[mc {Copyright (c) %s} {1996-1997 Sun Microsystems, Inc.}]