Если все виджеты уже созданы, вы можете применить SetFont
рекурсивно, например, с помощью следующей функции:
def changeFontInChildren(win, font):
'''
Set font in given window and all its descendants.
@type win: L{wx.Window}
@type font: L{wx.Font}
'''
try:
win.SetFont(font)
except:
pass # don't require all objects to support SetFont
for child in win.GetChildren():
changeFontInChildren(child, font)
Пример использования, при котором весь текст в frame
становится шрифтом по умолчанию с курсивом:
newFont = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
newFont.SetStyle(wx.FONTSTYLE_ITALIC)
changeFontInChildren(frame, newFont)