summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorculler <culler>2017-11-15 03:41:56 (GMT)
committerculler <culler>2017-11-15 03:41:56 (GMT)
commitbed306585a5002355e30dab333d628688c39a4a1 (patch)
tree2d29b8a31229a0a35cf3616496e36a38c5b60632 /library
parentf8dee9a0228dd40bdbf2c5494772f4d49c1b3659 (diff)
downloadtk-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.pngbin0 -> 8157 bytes
-rw-r--r--library/demos/menu.tcl6
2 files changed, 4 insertions, 2 deletions
diff --git a/library/demos/images/earthmenu.png b/library/demos/images/earthmenu.png
new file mode 100644
index 0000000..c25b667
--- /dev/null
+++ b/library/demos/images/earthmenu.png
Binary files differ
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} {