]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxFontDialog.py
Added possibility of 2-step initialisation, and wxWIZARD_EX_HELPBUTTON style.
[wxWidgets.git] / wxPython / demo / wxFontDialog.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
0c3d4bfd
RD
7 data = wxFontData()
8 dlg = wxFontDialog(frame, data)
cf694132
RD
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
0c3d4bfd 37wxFontDialog(wxWindow* parent, wxFontData* data)
cf694132 38
0c3d4bfd 39Constructor. Pass a parent window and a font data object, which will be copied to the font dialog's font data.
cf694132 40"""