Select a font from FontDialog : FontDialog : WxPython PYTHON TUTORIALS


PYTHON TUTORIALS » WxPython » FontDialog »

 

Select a font from FontDialog


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 pointsn' % (font.GetFaceName(), font.GetPointSize())
dialog.Destroy()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo WxPython
» FontDialog