diff options
author | culler <culler> | 2017-11-15 03:41:56 (GMT) |
---|---|---|
committer | culler <culler> | 2017-11-15 03:41:56 (GMT) |
commit | bed306585a5002355e30dab333d628688c39a4a1 (patch) | |
tree | 2d29b8a31229a0a35cf3616496e36a38c5b60632 /library | |
parent | f8dee9a0228dd40bdbf2c5494772f4d49c1b3659 (diff) | |
download | tk-bed306585a5002355e30dab333d628688c39a4a1.zip tk-bed306585a5002355e30dab333d628688c39a4a1.tar.gz tk-bed306585a5002355e30dab333d628688c39a4a1.tar.bz2 |
Modify the menu demo so that it includes a photoimage in a menu.
Diffstat (limited to 'library')
-rw-r--r-- | library/demos/images/earthmenu.png | bin | 0 -> 8157 bytes | |||
-rw-r--r-- | library/demos/menu.tcl | 6 |
2 files changed, 4 insertions, 2 deletions
diff --git a/library/demos/images/earthmenu.png b/library/demos/images/earthmenu.png Binary files differnew file mode 100644 index 0000000..c25b667 --- /dev/null +++ b/library/demos/images/earthmenu.png diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index e32b54f..557bf45 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -114,10 +114,12 @@ set m $w.menu.icon $w.menu add cascade -label "Icons" -menu $m -underline 0 menu $m -tearoff 0 # Main widget program sets variable tk_demoDirectory -$m add command -bitmap @[file join $tk_demoDirectory images pattern.xbm] \ +image create photo lilearth -file [file join $tk_demoDirectory \ +images earthmenu.png] +$m add command -image lilearth \ -hidemargin 1 -command [list \ tk_dialog $w.pattern {Bitmap Menu Entry} \ - "The menu entry you invoked displays a bitmap rather than\ + "The menu entry you invoked displays a photoimage rather than\ a text string. Other than this, it is just like any other\ menu entry." {} 0 OK ] foreach i {info questhead error} { |