]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxFontDialog.py
Cleaned up paint DC cache in ~wxPaintDC to avoid spurious memory warning
[wxWidgets.git] / utils / wxPython / demo / wxFontDialog.py
1
2 from wxPython.wx import *
3
4 #---------------------------------------------------------------------------
5
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()))
14 dlg.Destroy()
15
16 #---------------------------------------------------------------------------
17
18
19
20
21
22
23
24
25
26
27
28
29
30 overview = """\
31 This class represents the font chooser dialog.
32
33 wxFontDialog()
34 ----------------------------
35
36 wxFontDialog(wxWindow* parent, wxFontData* data = NULL)
37
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.
39 """