diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-03-20 11:01:17 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-03-20 11:01:17 (GMT) |
commit | 8f7707653b9ac42b85c20829da58e22406c6751f (patch) | |
tree | c63fdd6f1e4af6a9d74ed564d9b9ef0e5258f036 /library/menu.tcl | |
parent | bf7d92fb1e4658fa162297fe3de4d4046724d166 (diff) | |
download | tk-8f7707653b9ac42b85c20829da58e22406c6751f.zip tk-8f7707653b9ac42b85c20829da58e22406c6751f.tar.gz tk-8f7707653b9ac42b85c20829da58e22406c6751f.tar.bz2 |
Add <<Invoke>> bindings to button, listbox and menu, for consistancy with ttk.
Diffstat (limited to 'library/menu.tcl')
-rw-r--r-- | library/menu.tcl | 7 |
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 } |