diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2001-11-12 15:01:32 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2001-11-12 15:01:32 (GMT) |
commit | 34b54239ebfc56c1a662404422042b457b478358 (patch) | |
tree | 6f329df80415a08acd1bea21f44d1974b46471de | |
parent | c9861ecdabab79fdb43bbd42e75cfbfc53d3831c (diff) | |
download | tk-34b54239ebfc56c1a662404422042b457b478358.zip tk-34b54239ebfc56c1a662404422042b457b478358.tar.gz tk-34b54239ebfc56c1a662404422042b457b478358.tar.bz2 |
Yet more -compound showing off, prompted by Vince Darley
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | library/demos/menu.tcl | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,7 @@ 2001-11-12 Donal K. Fellows <fellowsd@cs.man.ac.uk> + * library/demos/menu.tcl: Show off -compound support in menus. + * library/demos/radio.tcl: Added some code to both show off the extra capabilities of the buttons and also show what can be done with compound images on the sly. diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index 097b725..45ca931 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a window with a bunch of menus # and cascaded menus using menubars. # -# RCS: @(#) $Id: menu.tcl,v 1.2 1998/09/14 18:23:29 stanton Exp $ +# RCS: @(#) $Id: menu.tcl,v 1.3 2001/11/12 15:01:33 dkf Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -131,6 +131,12 @@ menu $m -tearoff 0 foreach i {{An entry} {Another entry} {Does nothing} {Does almost nothing} {Make life meaningful}} { $m add command -label $i -command [list puts "You invoked \"$i\""] } +$m entryconfigure "Does almost nothing" \ + -bitmap questhead -compound left -command { + tk_dialog .compound {Compound Menu Entry} {The menu entry you invoked\ + displays both a bitmap and a text string. Other than this, it\ + is just like any other menu entry.} {} 0 OK +} set m $w.menu.colors $w.menu add cascade -label "Colors" -menu $m -underline 1 |