There was an error while loading. Please reload this page.
1 parent 64e461b commit 5b62b35Copy full SHA for 5b62b35
1 file changed
Lib/idlelib/configdialog.py
@@ -157,7 +157,9 @@ def create_page_font_tab(self):
157
frame_font_name, justify=LEFT, text='Font Face :')
158
self.fontlist = Listbox(
159
frame_font_name, height=5, takefocus=FALSE, exportselection=FALSE)
160
- self.fontlist.bind('<<ListboxSelect>>', self.on_fontlist_select)
+ 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)
163
scroll_font = Scrollbar(frame_font_name)
164
scroll_font.config(command=self.fontlist.yview)
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.
977
"""
- 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)
980
self.font_name.set(font.lower())
981
self.set_font_sample()
982
0 commit comments