Can I change the font used by wxStaticText?
If so, how?
Can I change the font used by wxStaticText?
If so, how?
Use 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
Or you can just do (although I didn't try this one...)
textFont = wxFont(10, wxDEFAULT, wxNORMAL, wxNORMAL) #or whatever you like
someStaticText.SetFont(textFont)
HTH
#--------------------------------
Jeff Sasmor
jeff@sasmor.com
----- Original Message -----
From: "William Wicker" <William_Wicker@spectratechnologies.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Tuesday, June 25, 2002 11:35 AM
Subject: [wxPython] Setting font for StaticText?
Can I change the font used by wxStaticText?
If so, how?
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users