summaryrefslogtreecommitdiffstats
path: root/library/demos/hscale.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/demos/hscale.tcl')
-rw-r--r--library/demos/hscale.tcl10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/demos/hscale.tcl b/library/demos/hscale.tcl
index 4902d8e..1df144d 100644
--- a/library/demos/hscale.tcl
+++ b/library/demos/hscale.tcl
@@ -6,6 +6,8 @@ if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
+package require Tk
+
set w .hscale
catch {destroy $w}
toplevel $w
@@ -16,11 +18,9 @@ positionWindow $w
label $w.msg -font $font -wraplength 3.5i -justify left -text "An arrow and a horizontal scale are displayed below. If you click or drag mouse button 1 in the scale, you can change the length of the arrow."
pack $w.msg -side top -padx .5c
-frame $w.buttons
-pack $w.buttons -side bottom -fill x -pady 2m
-button $w.buttons.dismiss -text Dismiss -command "destroy $w"
-button $w.buttons.code -text "See Code" -command "showCode $w"
-pack $w.buttons.dismiss $w.buttons.code -side left -expand 1
+## See Code / Dismiss buttons
+set btns [addSeeDismiss $w.buttons $w]
+pack $btns -side bottom -fill x
frame $w.frame -borderwidth 10
pack $w.frame -side top -fill x