summaryrefslogtreecommitdiffstats
path: root/library/menu.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-03-20 11:01:17 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-03-20 11:01:17 (GMT)
commitdd622145cae796c60c2430c9d56f3826ea0c019f (patch)
tree6733502bf5fed4582a907e7e0cc3b51c630cfaea /library/menu.tcl
parent3f3c5ab2f81fc5a887037f6a10e47111000d4430 (diff)
downloadtk-dd622145cae796c60c2430c9d56f3826ea0c019f.zip
tk-dd622145cae796c60c2430c9d56f3826ea0c019f.tar.gz
tk-dd622145cae796c60c2430c9d56f3826ea0c019f.tar.bz2
Add <<Invoke>> bindings to button, listbox and menu, for consistancy with ttk.
FossilOrigin-Name: bb6cac1113f7b564b2f0f5730fb35a46a505e75b
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 cc57532..f133c87 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
}