diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-20 11:01:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-20 11:01:17 (GMT) |
commit | 9c402860fb020d8e4edbbb2a738c1a0312fb3089 (patch) | |
tree | 6733502bf5fed4582a907e7e0cc3b51c630cfaea /library | |
parent | 1e43f52d3f5a853bf95be27798ace31ea8ee2884 (diff) | |
download | tk-9c402860fb020d8e4edbbb2a738c1a0312fb3089.zip tk-9c402860fb020d8e4edbbb2a738c1a0312fb3089.tar.gz tk-9c402860fb020d8e4edbbb2a738c1a0312fb3089.tar.bz2 |
Add <<Invoke>> bindings to button, listbox and menu, for consistancy with ttk.
Diffstat (limited to 'library')
-rw-r--r-- | library/button.tcl | 9 | ||||
-rw-r--r-- | library/listbox.tcl | 3 | ||||
-rw-r--r-- | library/menu.tcl | 7 |
3 files changed, 19 insertions, 0 deletions
diff --git a/library/button.tcl b/library/button.tcl index d095b8a..75378cc 100644 --- a/library/button.tcl +++ b/library/button.tcl @@ -109,6 +109,15 @@ bind Checkbutton <space> { bind Radiobutton <space> { tk::CheckRadioInvoke %W } +bind Button <<Invoke>> { + tk::ButtonInvoke %W +} +bind Checkbutton <<Invoke>> { + tk::CheckRadioInvoke %W +} +bind Radiobutton <<Invoke>> { + tk::CheckRadioInvoke %W +} bind Button <FocusIn> {} bind Button <Enter> { diff --git a/library/listbox.tcl b/library/listbox.tcl index f3434a5..2d9af20 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -142,6 +142,9 @@ bind Listbox <<Copy>> { bind Listbox <space> { tk::ListboxBeginSelect %W [%W index active] } +bind Listbox <<Invoke>> { + tk::ListboxBeginSelect %W [%W index active] +} bind Listbox <Select> { tk::ListboxBeginSelect %W [%W index active] } 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 } |