File tree 3 files changed +32
-4
lines changed
3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ grid $_sa -row $row -rowspan 6 -column 0 -sticky w -padx {10 0} -pady {5 0}
54
54
#
55
55
set l [ttk::label $cf .l$row -text " Release:" ]
56
56
grid $l -row $row -column 1 -sticky w -padx {10 0} -pady {5 0}
57
- ttk::style map TCombobox -fieldbackground {readonly white}
57
+ ttk::style map TCombobox -fieldbackground \
58
+ [list {readonly focus} lightYellow readonly white]
58
59
set cb [ttk::combobox $cf .cb -state readonly -width 14]
59
60
grid $cb -row $row -column 2 -sticky w -padx {5 10} -pady {5 0}
60
61
@@ -442,6 +443,11 @@ proc configTablelist {} {
442
443
}
443
444
}
444
445
446
+ #
447
+ # Make the keyboard navigation more user-friendly
448
+ #
449
+ bind $w <<TraverseIn>> [list $sf see %W]
450
+
445
451
incr row
446
452
}
447
453
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ foreach country $countryList capital $capitalList {
66
66
67
67
set capitalList [lsort $capitalList ]
68
68
69
- ttk::style map TCombobox -fieldbackground {readonly white}
70
- set btnStyle [expr {$::ttk::currentTheme eq " aqua" ? " TButton" : " Toolbutton" }]
69
+ ttk::style map TCombobox -fieldbackground \
70
+ [list {readonly focus} lightYellow readonly white]
71
+ set btnStyle [expr {$ttk::currentTheme eq " aqua" ? " TButton" : " Toolbutton" }]
71
72
72
73
set row 0
73
74
foreach country $countryList {
@@ -79,6 +80,11 @@ foreach country $countryList {
79
80
bind $w <<ComboboxSelected>> [list checkCapital %W $country ]
80
81
grid $w -row $row -column 1 -sticky w -padx {5 0} -pady {4 0}
81
82
83
+ #
84
+ # Make the keyboard navigation more user-friendly
85
+ #
86
+ bind $w <<TraverseIn>> [list $sf see %W]
87
+
82
88
#
83
89
# Adapt the handling of the mouse wheel events for the ttk::combobox widget
84
90
#
@@ -88,6 +94,11 @@ foreach country $countryList {
88
94
-command [list setCapital $w $country ]]
89
95
grid $b -row $row -column 2 -sticky w -padx 5 -pady {4 0}
90
96
97
+ #
98
+ # Make the keyboard navigation more user-friendly
99
+ #
100
+ bind $b <<TraverseIn>> [list $sf see %W]
101
+
91
102
incr row
92
103
}
93
104
Original file line number Diff line number Diff line change @@ -37,7 +37,18 @@ if {$ttk::currentTheme eq "aqua"} {
37
37
# Get the content frame and populate it
38
38
#
39
39
set cf [$sf getframe]
40
- source ScrollableFrmContent.tcl
40
+ source BwScrollableFrmContent.tcl
41
+
42
+ #
43
+ # Make the keyboard navigation more user-friendly
44
+ #
45
+ foreach w [list $cb $sb $e $me ] {
46
+ bind $w <<TraverseIn>> [list $sf see %W]
47
+ }
48
+ foreach w [list $txt $lb $tbl $tv ] {
49
+ bind $w <<TraverseIn>> [list seeParent $sf %W]
50
+ }
51
+ proc seeParent {sf w} { $sf see [winfo parent $w ] }
41
52
42
53
#
43
54
# Additional stuff related to the mouse wheel events:
You can’t perform that action at this time.
0 commit comments