diff --git a/demo/GridLabelRenderer.py b/demo/GridLabelRenderer.py index 5a93707e..67ea895f 100644 --- a/demo/GridLabelRenderer.py +++ b/demo/GridLabelRenderer.py @@ -33,7 +33,7 @@ class MyColLabelRenderer(glr.GridLabelRenderer): def Draw(self, grid, dc, rect, col): dc.SetBrush(wx.Brush(self._bgcolor)) dc.SetPen(wx.TRANSPARENT_PEN) - dc.DrawRectangleRect(rect) + dc.DrawRectangle(rect) hAlign, vAlign = grid.GetColLabelAlignment() text = grid.GetColLabelValue(col) self.DrawBorder(grid, dc, rect) diff --git a/demo/Grid_MegaExample.py b/demo/Grid_MegaExample.py index 459941c7..332693b5 100644 --- a/demo/Grid_MegaExample.py +++ b/demo/Grid_MegaExample.py @@ -220,7 +220,7 @@ class MegaImageRenderer(Grid.GridCellRenderer): else: dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_SOLID)) dc.SetPen(wx.Pen(wx.WHITE, 1, wx.PENSTYLE_SOLID)) - dc.DrawRectangleRect(rect) + dc.DrawRectangle(rect) # copy the image but only to the size of the grid cell @@ -265,7 +265,7 @@ class MegaFontRenderer(Grid.GridCellRenderer): else: dc.SetBrush(wx.Brush(wx.WHITE, wx.BRUSHSTYLE_SOLID)) dc.SetPen(wx.Pen(wx.WHITE, 1, wx.PENSTYLE_SOLID)) - dc.DrawRectangleRect(rect) + dc.DrawRectangle(rect) text = self.table.GetValue(row, col) dc.SetBackgroundMode(wx.SOLID) diff --git a/demo/Main.py b/demo/Main.py index 87627817..40f392f3 100644 --- a/demo/Main.py +++ b/demo/Main.py @@ -56,6 +56,8 @@ import re import shutil from threading import Thread +from distutils.version import LooseVersion + import wx import wx.adv import wx.lib.agw.aui as aui @@ -2879,7 +2881,7 @@ class MySplashScreen(SplashScreen): from wx.lib.mixins.treemixin import ExpansionState if USE_CUSTOMTREECTRL: - import wx.lib.customtreectrl as CT + import wx.lib.agw.customtreectrl as CT TreeBaseClass = CT.CustomTreeCtrl else: TreeBaseClass = wx.TreeCtrl @@ -2925,7 +2927,7 @@ class MyApp(wx.App, wx.lib.mixins.inspection.InspectionMixin): def OnInit(self): # Check runtime version - if version.VERSION_STRING != wx.VERSION_STRING: + if LooseVersion(version.VERSION_STRING) >= LooseVersion(wx.VERSION_STRING): wx.MessageBox(caption="Warning", message="You're using version %s of wxPython, but this copy of the demo was written for version %s.\n" "There may be some version incompatibilities..."