File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Expand file tree Collapse file tree 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}
5454#
5555set l [ttk::label $cf .l$row -text " Release:" ]
5656grid $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]
5859set cb [ttk::combobox $cf .cb -state readonly -width 14]
5960grid $cb -row $row -column 2 -sticky w -padx {5 10} -pady {5 0}
6061
@@ -442,6 +443,11 @@ proc configTablelist {} {
442443 }
443444 }
444445
446+ #
447+ # Make the keyboard navigation more user-friendly
448+ #
449+ bind $w <<TraverseIn>> [list $sf see %W]
450+
445451 incr row
446452 }
447453
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ foreach country $countryList capital $capitalList {
6666
6767set capitalList [lsort $capitalList ]
6868
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" }]
7172
7273set row 0
7374foreach country $countryList {
@@ -79,6 +80,11 @@ foreach country $countryList {
7980 bind $w <<ComboboxSelected>> [list checkCapital %W $country ]
8081 grid $w -row $row -column 1 -sticky w -padx {5 0} -pady {4 0}
8182
83+ #
84+ # Make the keyboard navigation more user-friendly
85+ #
86+ bind $w <<TraverseIn>> [list $sf see %W]
87+
8288 #
8389 # Adapt the handling of the mouse wheel events for the ttk::combobox widget
8490 #
@@ -88,6 +94,11 @@ foreach country $countryList {
8894 -command [list setCapital $w $country ]]
8995 grid $b -row $row -column 2 -sticky w -padx 5 -pady {4 0}
9096
97+ #
98+ # Make the keyboard navigation more user-friendly
99+ #
100+ bind $b <<TraverseIn>> [list $sf see %W]
101+
91102 incr row
92103}
93104
Original file line number Diff line number Diff line change @@ -37,7 +37,18 @@ if {$ttk::currentTheme eq "aqua"} {
3737# Get the content frame and populate it
3838#
3939set 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 ] }
4152
4253#
4354# Additional stuff related to the mouse wheel events:
You can’t perform that action at this time.
0 commit comments