Select a font from FontDialog : FontDialog « wxPython « Python Tutorial






Select a font from FontDialog
import wx


app = wx.PySimpleApp()
dialog = wx.FontDialog(None, wx.FontData())
if dialog.ShowModal() == wx.ID_OK:
    data = dialog.GetFontData()
    font = data.GetChosenFont()
    colour = data.GetColour()
    print 'You selected: "%s", %d points\n' % (font.GetFaceName(), font.GetPointSize())
dialog.Destroy()








19.14.FontDialog
19.14.1.Select a font from FontDialogSelect a font from FontDialog