From: "Jeff Sasmor" <jsasmor@gte.net>
To: <wxpython-users@lists.wxwindows.org>
Subject: Re: [wxPython] Setting font for StaticText?
Date: Tue, 25 Jun 2002 12:23:05 -0400
Reply-To: wxpython-users@lists.wxwindows.orgUse the SetFont method.
If you want to make something bigger, say, in the same font, then
something
like this will work:t = wxStaticText(self,-1,'Whatever')
f = t.GetFont() #get the
static text's font
ps = f.GetPointSize() #its point size
ps += 1 #bump up
the point size
f.SetPointSize(ps) #reset the
point size in the font
t.SetFont(f) #set the
font back into the static text
del f
This works great! I obviously didn't run far enough up the class hierarchy
in my search.
Thanks!
William.