wxGraphicsContext.GetTextExntent() crash
Expo
expo at expobrain.net
Thu Jan 3 09:11:40 PST 2008
With this simple code the GetTextExtent() method of wxGraphicsContext =
crash mysteriosly in apparence.
-- =
EXPO - Hardware solution, Software revolution
http://www.expobrain.net
Esposti Daniele
Via Aldo Moro, 14/h
20085 - Locate di Triulzi (MI)
Cell 347/0748470
-------------- next part --------------
import wx
class myframe(wx.Frame):
def __init__(self, *args, **kwds):
wx.Frame.__init__(self, *args, **kwds)
self.Bind( wx.EVT_PAINT, self.OnPaint)
=
def OnPaint(self, event):
dc =3D wx.PaintDC(self)
gc =3D wx.GraphicsContext.Create(dc)
print gc.GetTextExtent('aaa')
=
class myapp(wx.App):
def OnInit(self):
frame =3D myframe(None)
frame.Show(1)
self.SetTopWindow(frame)
return 1
app =3D myapp(0)
app.MainLoop()
More information about the wxpython-users
mailing list