]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxFontDialog.py
2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
6 def runTest(frame
, nb
, log
):
7 dlg
= wxFontDialog(frame
)
8 if dlg
.ShowModal() == wxID_OK
:
9 data
= dlg
.GetFontData()
10 font
= data
.GetChosenFont()
11 log
.WriteText('You selected: "%s", %d points, color %s\n' %
12 (font
.GetFaceName(), font
.GetPointSize(),
13 data
.GetColour().Get()))
16 #---------------------------------------------------------------------------
31 This class represents the font chooser dialog.
34 ----------------------------
36 wxFontDialog(wxWindow* parent, wxFontData* data = NULL)
38 Constructor. Pass a parent window, and optionally a pointer to a block of font data, which will be copied to the font dialog's font data.