summaryrefslogtreecommitdiffstats
path: root/library/demos/widget
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-08-22 22:44:14 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-08-22 22:44:14 (GMT)
commit692965d98c95bc29633660474c8fc34b3abbd092 (patch)
tree9660f5070a3ea6ce4ce829240ff9bf16c2e1fe1e /library/demos/widget
parent96371ea01bec52dfda6c5451136e4e4af7d9bd5e (diff)
downloadtk-692965d98c95bc29633660474c8fc34b3abbd092.zip
tk-692965d98c95bc29633660474c8fc34b3abbd092.tar.gz
tk-692965d98c95bc29633660474c8fc34b3abbd092.tar.bz2
Brought tk_messageBox demo into line with the newer look-and-feel for the demos.
Diffstat (limited to 'library/demos/widget')
-rw-r--r--library/demos/widget13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/demos/widget b/library/demos/widget
index 6183745..f0ad7a7 100644
--- a/library/demos/widget
+++ b/library/demos/widget
@@ -11,7 +11,7 @@ exec wish "$0" "$@"
# ".tcl" files is this directory, which are sourced by this script
# as needed.
#
-# RCS: @(#) $Id: widget,v 1.14 2003/08/21 00:02:56 hobbs Exp $
+# RCS: @(#) $Id: widget,v 1.15 2003/08/22 22:44:15 dkf Exp $
eval destroy [winfo child .]
package require msgcat
@@ -310,7 +310,7 @@ focus .s
# Arguments:
# w - The name of the frame to use.
-proc addSeeDismiss {w show {vars {}}} {
+proc addSeeDismiss {w show {vars {}} {extra {}}} {
## See Code / Dismiss buttons
frame $w
frame $w.sep -height 2 -relief sunken -bd 2
@@ -321,14 +321,17 @@ proc addSeeDismiss {w show {vars {}}} {
button $w.code -text [mc "See Code"] \
-image ::img::view -compound left \
-command [list showCode $show]
+ set buttons [list x $w.code $w.dismiss]
if {[llength $vars]} {
button $w.vars -text [mc "See Variables"] \
-image ::img::view -compound left \
-command [concat [list showVars $w.dialog] $vars]
- grid x $w.vars $w.code $w.dismiss -padx 4 -pady 4
- } else {
- grid x $w.code $w.dismiss -padx 4 -pady 4
+ set buttons [linsert $buttons 1 $w.vars]
+ }
+ if {$extra ne ""} {
+ set buttons [linsert $buttons 1 [uplevel 1 $extra]]
}
+ eval grid $buttons -padx 4 -pady 4
grid columnconfigure $w 0 -weight 1
return $w
}