Hi folks,
I'm trying to change the wx.Font point size in wx.SpinCtrl, but it is
not working under MacOS X (Leopard 10.5.5). The font size simply
doesn't change - no matter 2, 20 or 200 is set in its font's
pointSize.
It worked fine under Fedora 10 and Windows XP. Any ideas?
The code is presented bellow.
Thanks in advance!
Regards,
Tatiana
PS: Currently using:
- Python 2.5
- wxPython 2.8.9.1
···
-------------------
import wx
class MainWindow(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(400,400))
self.control = wx.SpinCtrl(parent=self, id=-1, min=0, max=5000)
self.control.SetValue(2034)
# First try on changing font size
font = self.control.GetFont()
font.SetPointSize(200) # tried both 2, 20 and 200 but the font
is the same size
# Second try
#font = wx.Font(pointSize = 200,
# family = wx.FONTFAMILY_DEFAULT,
# style = wx.NORMAL,
# weight = wx.FONTWEIGHT_LIGHT)
# Third try
#font = wx.FFont(pointSize = 200, family = wx.FONTFAMILY_DEFAULT)
self.control.SetFont(font)
print "PointSize", self.control.GetFont().GetPointSize()
self.Show(True)
app = wx.PySimpleApp()
frame=MainWindow(None, wx.ID_ANY, 'Playing with wx.SpinCtrl font size')
app.MainLoop()