summaryrefslogtreecommitdiffstats
path: root/library/demos/menubu.tcl
diff options
context:
space:
mode:
authordas <das>2007-04-23 21:16:00 (GMT)
committerdas <das>2007-04-23 21:16:00 (GMT)
commit97873b5cca440eeaaf3787bc7d4fa5188b2510d3 (patch)
treed05530f9850fbb244956c2cdd80abfda3de610e3 /library/demos/menubu.tcl
parenteed9e6e51c9b315cca0fab5242fb5d5ed79f1d92 (diff)
downloadtk-97873b5cca440eeaaf3787bc7d4fa5188b2510d3.zip
tk-97873b5cca440eeaaf3787bc7d4fa5188b2510d3.tar.gz
tk-97873b5cca440eeaaf3787bc7d4fa5188b2510d3.tar.bz2
* library/demos/goldberg.tcl: fix overwriting of widget demo global.
* library/demos/menu.tcl: on aqua, use custom MDEF and tearoffs; * library/demos/menubu.tcl: correct menubutton toplevel name. * library/demos/puzzle.tcl: fix button size & padding for aqua. * library/demos/radio.tcl:
Diffstat (limited to 'library/demos/menubu.tcl')
-rw-r--r--library/demos/menubu.tcl14
1 files changed, 6 insertions, 8 deletions
diff --git a/library/demos/menubu.tcl b/library/demos/menubu.tcl
index e235fae..cec3284 100644
--- a/library/demos/menubu.tcl
+++ b/library/demos/menubu.tcl
@@ -1,9 +1,9 @@
-# menubutton.tcl --
+# menubu.tcl --
#
# This demonstration script creates a window with a bunch of menus
# and cascaded menus using menubuttons.
#
-# # RCS: @(#) $Id: menubu.tcl,v 1.5 2004/12/21 11:56:35 dkf Exp $
+# # RCS: @(#) $Id: menubu.tcl,v 1.6 2007/04/23 21:16:01 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -11,16 +11,16 @@ if {![info exists widgetDemo]} {
package require Tk
-set w .menubutton
+set w .menubu
catch {destroy $w}
toplevel $w
wm title $w "Menu Button Demonstration"
wm iconname $w "menubutton"
positionWindow $w
-
frame $w.body
pack $w.body -expand 1 -fill both
+if {[tk windowingsystem] eq "aqua"} {catch {set origUseCustomMDEF $::tk::mac::useCustomMDEF; set ::tk::mac::useCustomMDEF 1}}
menubutton $w.body.below -text "Below" -underline 0 -direction below -menu $w.body.below.m -relief raised
menu $w.body.below.m -tearoff 0
@@ -57,8 +57,7 @@ pack $body.buttons -padx 25 -pady 25
tk_optionMenu $body.buttons.options menubuttonoptions one two three
pack $body.buttons.options -side left -padx 25 -pady 25
set m [tk_optionMenu $body.buttons.colors paletteColor Black red4 DarkGreen NavyBlue gray75 Red Green Blue gray50 Yellow Cyan Magenta White Brown DarkSeaGreen DarkViolet]
-if {[string equal [tk windowingsystem] "classic"]
- || [string equal [tk windowingsystem] "aqua"]} {
+if {[tk windowingsystem] eq "aqua"} {
set topBorderColor Black
set bottomBorderColor Black
} else {
@@ -90,5 +89,4 @@ foreach i {Black gray75 gray50 White} {
pack $body.buttons.colors -side left -padx 25 -pady 25
-
-
+if {[tk windowingsystem] eq "aqua"} {catch {set ::tk::mac::useCustomMDEF $origUseCustomMDEF}}