summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-03-27 11:58:20 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-03-27 11:58:20 (GMT)
commit92c3246c48b45d9079fe67bef26578cff9f0ca80 (patch)
tree2398fdd617e2e98ab71885b07c48a1b3418f1cb0 /library
parent40139be1cf01796bdd5f15449eb16ec5e389e317 (diff)
parent0ccf5b8ea3693952416bd5b5111667f7ecb5b135 (diff)
downloadtk-92c3246c48b45d9079fe67bef26578cff9f0ca80.zip
tk-92c3246c48b45d9079fe67bef26578cff9f0ca80.tar.gz
tk-92c3246c48b45d9079fe67bef26578cff9f0ca80.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) FossilOrigin-Name: b5f6c04d7db360665af9d4ef55ab46bfe905996d
Diffstat (limited to 'library')
-rw-r--r--library/button.tcl9
-rw-r--r--library/listbox.tcl3
-rw-r--r--library/menu.tcl7
3 files changed, 19 insertions, 0 deletions
diff --git a/library/button.tcl b/library/button.tcl
index a1f0a26..815b137 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 01fb03d..3270b5d 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 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
}