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