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):
157157 frame_font_name , justify = LEFT , text = 'Font Face :' )
158158 self .fontlist = Listbox (
159159 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 )
161163 scroll_font = Scrollbar (frame_font_name )
162164 scroll_font .config (command = self .fontlist .yview )
163165 self .fontlist .config (yscrollcommand = scroll_font .set )
@@ -973,7 +975,8 @@ def on_fontlist_select(self, event):
973975 Event can result from either mouse click or Up or Down key.
974976 Set font_name and example display to selection.
975977 """
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 )
977980 self .font_name .set (font .lower ())
978981 self .set_font_sample ()
979982
You can’t perform that action at this time.
0 commit comments