Added the sample code from wxPython In Action to the samples dir
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
16
wxPython/samples/wxPIA_book/Chapter-09/font_box.py
Normal file
16
wxPython/samples/wxPIA_book/Chapter-09/font_box.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import wx
|
||||
|
||||
if __name__ == "__main__":
|
||||
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()
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user