File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,9 @@ def create_page_font_tab(self):
157
157
frame_font_name , justify = LEFT , text = 'Font Face :' )
158
158
self .fontlist = Listbox (
159
159
frame_font_name , height = 5 , takefocus = FALSE , exportselection = FALSE )
160
- self .fontlist .bind ('<<ListboxSelect>>' , self .on_fontlist_select )
160
+ self .fontlist .bind ('<ButtonRelease-1>' , self .on_fontlist_select )
161
+ self .fontlist .bind ('<KeyRelease-Up>' , self .on_fontlist_select )
162
+ self .fontlist .bind ('<KeyRelease-Down>' , self .on_fontlist_select )
161
163
scroll_font = Scrollbar (frame_font_name )
162
164
scroll_font .config (command = self .fontlist .yview )
163
165
self .fontlist .config (yscrollcommand = scroll_font .set )
@@ -973,7 +975,8 @@ def on_fontlist_select(self, event):
973
975
Event can result from either mouse click or Up or Down key.
974
976
Set font_name and example display to selection.
975
977
"""
976
- font = self .fontlist .get (ANCHOR if event .type == 3 else ACTIVE )
978
+ font = self .fontlist .get (
979
+ ACTIVE if event .type .name == 'KeyRelease' else ANCHOR )
977
980
self .font_name .set (font .lower ())
978
981
self .set_font_sample ()
979
982
You can’t perform that action at this time.
0 commit comments