diff options
Diffstat (limited to 'library/demos/menubu.tcl')
-rw-r--r-- | library/demos/menubu.tcl | 14 |
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}} |