]> git.saurik.com Git - wxWidgets.git/blame_incremental - utils/wxPython/demo/wxFontDialog.py
workaround font data bug
[wxWidgets.git] / utils / wxPython / demo / wxFontDialog.py
... / ...
CommitLineData
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
7 data = wxFontData()
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()))
15 dlg.Destroy()
16
17#---------------------------------------------------------------------------
18
19
20
21
22
23
24
25
26
27
28
29
30
31overview = """\
32This class represents the font chooser dialog.
33
34wxFontDialog()
35----------------------------
36
37wxFontDialog(wxWindow* parent, wxFontData* data)
38
39Constructor. Pass a parent window and a font data object, which will be copied to the font dialog's font data.
40"""