1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
from wxPython.wx import *
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
2000-02-01 20:29:11 +00:00
|
|
|
data = wxFontData()
|
2002-01-15 04:54:19 +00:00
|
|
|
data.EnableEffects(true)
|
|
|
|
font_colour = wxColour(255, 0, 0) # colour of font (red)
|
|
|
|
data.SetColour(font_colour) # set colour
|
|
|
|
print data.GetColour()
|
2000-02-01 20:29:11 +00:00
|
|
|
dlg = wxFontDialog(frame, data)
|
1999-04-30 03:29:54 +00:00
|
|
|
if dlg.ShowModal() == wxID_OK:
|
|
|
|
data = dlg.GetFontData()
|
|
|
|
font = data.GetChosenFont()
|
|
|
|
log.WriteText('You selected: "%s", %d points, color %s\n' %
|
|
|
|
(font.GetFaceName(), font.GetPointSize(),
|
|
|
|
data.GetColour().Get()))
|
|
|
|
dlg.Destroy()
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overview = """\
|
|
|
|
This class represents the font chooser dialog.
|
|
|
|
|
|
|
|
wxFontDialog()
|
|
|
|
----------------------------
|
|
|
|
|
2000-02-01 20:29:11 +00:00
|
|
|
wxFontDialog(wxWindow* parent, wxFontData* data)
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2000-02-01 20:29:11 +00:00
|
|
|
Constructor. Pass a parent window and a font data object, which will be copied to the font dialog's font data.
|
1999-04-30 03:29:54 +00:00
|
|
|
"""
|