]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxFontDialog.py
Removed fstream include which seemed unnecessary, and gave errors for BC++ 5.5 anyway.
[wxWidgets.git] / wxPython / demo / wxFontDialog.py
1
2 from wxPython.wx import *
3
4 #---------------------------------------------------------------------------
5
6 def 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
31 overview = """\
32 This class represents the font chooser dialog.
33
34 wxFontDialog()
35 ----------------------------
36
37 wxFontDialog(wxWindow* parent, wxFontData* data)
38
39 Constructor. Pass a parent window and a font data object, which will be copied to the font dialog's font data.
40 """