Check for NotImplementedError
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,7 +19,13 @@ class TestPanel(wx.Panel):
|
||||
|
||||
def OnPaint(self, evt):
|
||||
dc = wx.PaintDC(self)
|
||||
gc = wx.GraphicsContext.Create(dc)
|
||||
try:
|
||||
gc = wx.GraphicsContext.Create(dc)
|
||||
except NotImplementedError:
|
||||
dc.DrawText("This build of wxPython does not support the wx.GraphicsContext "
|
||||
"family of classes.",
|
||||
25, 25)
|
||||
return
|
||||
|
||||
font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
|
||||
font.SetWeight(wx.BOLD)
|
||||
|
Reference in New Issue
Block a user