summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-09-12 20:08:05 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-09-12 20:08:05 (GMT)
commit4b5331097e6b9efbd08a526973eda3c897b69449 (patch)
tree3d1e02171ca59493a7fcf82e01afda42e099d1ec
parent5c7ab24fd2d1c51dfb625a498ae1e5d9d5cd4c35 (diff)
parentfddf1502adf93ca63d12bd3596e4621b7686dd94 (diff)
downloadtk-4b5331097e6b9efbd08a526973eda3c897b69449.zip
tk-4b5331097e6b9efbd08a526973eda3c897b69449.tar.gz
tk-4b5331097e6b9efbd08a526973eda3c897b69449.tar.bz2
Fix [2834776fff]: ttk::spinbox spins up/down when disabled
-rw-r--r--library/ttk/spinbox.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/ttk/spinbox.tcl b/library/ttk/spinbox.tcl
index 1aa0ccb..90a1572 100644
--- a/library/ttk/spinbox.tcl
+++ b/library/ttk/spinbox.tcl
@@ -81,6 +81,7 @@ proc ttk::spinbox::Release {w} {
# or <<Decrement> (+1, down) events.
#
proc ttk::spinbox::MouseWheel {w dir} {
+ if {[$w instate disabled]} { return }
if {$dir < 0} {
event generate $w <<Increment>>
} else {
@@ -132,6 +133,7 @@ proc ttk::spinbox::Adjust {w v min max} {
# -from, -to, and -increment.
#
proc ttk::spinbox::Spin {w dir} {
+ if {[$w instate disabled]} { return }
set nvalues [llength [set values [$w cget -values]]]
set value [$w get]
if {$nvalues} {