MCPcopy Index your code
hub / github.com/python/cpython / on_fontlist_select

Method on_fontlist_select

Lib/idlelib/configdialog.py:427–435  ·  view source on GitHub ↗

Handle selecting a font from the list. Event can result from either mouse click or Up or Down key. Set font_name and example displays to selection.

(self, event)

Source from the content-addressed store, hash-verified

425 self.set_samples()
426
427 def on_fontlist_select(self, event):
428 """Handle selecting a font from the list.
429
430 Event can result from either mouse click or Up or Down key.
431 Set font_name and example displays to selection.
432 """
433 font = self.fontlist.get(
434 ACTIVE if event.type.name == 'KeyRelease' else ANCHOR)
435 self.font_name.set(font.lower())
436
437 def set_samples(self, event=None):
438 """Update both screen samples with the font settings.

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
setMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected