summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2024-01-28 09:26:06 (GMT)
committerfvogel <fvogelnew1@free.fr>2024-01-28 09:26:06 (GMT)
commit94c43af238aa6f3e2ab28e490fb979a079befc41 (patch)
tree4e9e80c9cafc74591da2fb1139cde3f54b97abc2 /library/ttk
parentc3b21bba760c1c47f0ac5c7a139b21e4980e8058 (diff)
downloadtk-94c43af238aa6f3e2ab28e490fb979a079befc41.zip
tk-94c43af238aa6f3e2ab28e490fb979a079befc41.tar.gz
tk-94c43af238aa6f3e2ab28e490fb979a079befc41.tar.bz2
Do the same for ttk::spinbox and ttk::combobox. This is not absolutely needed: there is no error triggering on <<NextWord>>/<<PrevWord>> because these widgets inherit the -show option from ttk::entry even if it does not really make sense for these types of widget. However it's better to do it for those widgets so that the behavior is consistent with Tk widgets, and in case people use -show with ttk::spinbox/combobox they would not be able to identify the words in the widget (see [2a32225cd1]).
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/entry.tcl6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl
index 4d3874f..a9938cd 100644
--- a/library/ttk/entry.tcl
+++ b/library/ttk/entry.tcl
@@ -254,7 +254,8 @@ set ::ttk::entry::State(startNext) \
[string equal [tk windowingsystem] "win32"]
proc ttk::entry::NextWord {w start} {
- if {[$w cget -show] ne ""} {
+ # the check on [winfo class] is because the spinbox and combobox also use this proc
+ if {[winfo class $w] eq "TEntry" && [$w cget -show] ne ""} {
return end
}
variable State
@@ -271,7 +272,8 @@ proc ttk::entry::NextWord {w start} {
## PrevWord -- Find the previous word position.
#
proc ttk::entry::PrevWord {w start} {
- if {[$w cget -show] ne ""} {
+ # the check on [winfo class] is because the spinbox and combobox also use this proc
+ if {[winfo class $w] eq "TEntry" && [$w cget -show] ne ""} {
return 0
}
set pos [tcl_startOfPreviousWord [$w get] [$w index $start]]