On Mon, 12 Nov 2012 02:03:13 -0800 (PST) Gregory Papadopoulos wrote:
GP> This time I can verify that it doesn't work otherwise. This is the paint
GP> routine that doesn't work
GP>
GP> def OnPaint(self, event):
GP> dc = wx.PaintDC(self)
GP> dc.SetMapMode(wx.MM_TWIPS)
GP> font = dc.GetFont()
GP> font.SetPointSize(182)
GP> dc.SetFont(font)
GP> dc.DrawText('How about now', 0, 0)
GP>
GP> while this works:
GP>
GP> def OnPaint(self, event):
GP> dc = wx.PaintDC(self)
GP> dc.SetMapMode(wx.MM_TWIPS)
GP> dc.SetFont(wx.Font(182, wx.FONTFAMILY_ROMAN, wx.FONTSTYLE_NORMAL,
GP> wx.FONTWEIGHT_NORMAL))
GP> font = dc.GetFont()
GP> font.SetPointSize(182)
GP> dc.SetFont(font)
GP> dc.DrawText('How about now', 0, 0)
GP>
GP> The first piece does exactly what you are proposing on your C++ code. Well,
GP> besides the text rendered and its position.
GP> The second just works, even on the original code by adding that line (or
GP> any equivalent I guess).
Strange, I don't see why would the behaviour be different in Python and
C++.
GP> Would you like me to take a deeper look into it? Any thoughts/proposals on
GP> what we should do?
First, could you please check if the problem persists if you draw directly
on wxFrame, like my code did, or if it only happens when using
wxScrolledWindow?
Second, please try to test with the latest svn if possible or retest with
2.9.5 when it's out. While I don't remember any relevant changes in the
code, perhaps something did change recently.
Thanks,