summaryrefslogtreecommitdiffstats
path: root/library/menu.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-27 11:58:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-27 11:58:20 (GMT)
commit729820db14607dca8ab6a8185bef5928b8bbed6f (patch)
tree2398fdd617e2e98ab71885b07c48a1b3418f1cb0 /library/menu.tcl
parent848a0b0986e95d797bcbb1f50240f345a9c2d9a9 (diff)
parentbe9d4efe7ba6f645e1cd3e8c93dfa13f634eb972 (diff)
downloadtk-729820db14607dca8ab6a8185bef5928b8bbed6f.zip
tk-729820db14607dca8ab6a8185bef5928b8bbed6f.tar.gz
tk-729820db14607dca8ab6a8185bef5928b8bbed6f.tar.bz2
[Bug 3608074]: Add <<Invoke>> bindings to Button's, Listbox and Menu.
Document <<Invoke>>, <<ThemeChanged>>, <<EnteredChild>> (ttk_pandedwindow only) and <<Increment/Decrement>> (ttk_spinbox only)
Diffstat (limited to 'library/menu.tcl')
-rw-r--r--library/menu.tcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/menu.tcl b/library/menu.tcl
index cfe7536..5f46a01 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -106,6 +106,10 @@ bind Menubutton <space> {
tk::MbPost %W
tk::MenuFirstEntry [%W cget -menu]
}
+bind Menubutton <<Invoke>> {
+ tk::MbPost %W
+ tk::MenuFirstEntry [%W cget -menu]
+}
# Must set focus when mouse enters a menu, in order to allow
# mixed-mode processing using both the mouse and the keyboard.
@@ -143,6 +147,9 @@ bind Menu <ButtonRelease> {
bind Menu <space> {
tk::MenuInvoke %W 0
}
+bind Menu <<Invoke>> {
+ tk::MenuInvoke %W 0
+}
bind Menu <Return> {
tk::MenuInvoke %W 0
}