]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxGrid_MegaExample.py
reSWIGged
[wxWidgets.git] / wxPython / demo / wxGrid_MegaExample.py
index aa77588e5128704a35d788151c3384aad95efbbd..751e7ab2916fd2414ec5e1edbba21e18bae4c184 100644 (file)
@@ -38,8 +38,8 @@ class MegaTable(Grid.PyGridTableBase):
     def GetColLabelValue(self, col):
         return self.colnames[col]
 
-    def GetRowLabelValues(self, row):
-        return self.data[row][0]
+    def GetRowLabelValue(self, row):
+        return "row %03d" % int(self.data[row][0])
 
     def GetValue(self, row, col):
         return str(self.data[row][1].get(self.GetColLabelValue(col), ""))
@@ -219,8 +219,8 @@ class MegaImageRenderer(Grid.PyGridCellRenderer):
             dc.SetBrush(wx.Brush(wx.BLUE, wx.SOLID))
             dc.SetPen(wx.Pen(wx.BLUE, 1, wx.SOLID))
         else:
-            dc.SetBrush(wxBrush(wxWHITE, wxSOLID))
-            dc.SetPen(wxPen(wxWHITE, 1, wxSOLID))
+            dc.SetBrush(wx.Brush(wx.WHITE, wx.SOLID))
+            dc.SetPen(wx.Pen(wx.WHITE, 1, wx.SOLID))
         dc.DrawRectangleRect(rect)
 
         #dc.DrawRectangle((rect.x, rect.y), (rect.width, rect.height))
@@ -236,7 +236,7 @@ class MegaImageRenderer(Grid.PyGridCellRenderer):
 
         dc.Blit((rect.x+1, rect.y+1), (width, height),
                 image,
-                (0, 0), wxCOPY, True)
+                (0, 0), wx.COPY, True)
 
 
 class MegaFontRenderer(Grid.PyGridCellRenderer):
@@ -265,8 +265,8 @@ class MegaFontRenderer(Grid.PyGridCellRenderer):
             dc.SetBrush(wx.Brush(wx.BLUE, wx.SOLID))
             dc.SetPen(wx.Pen(wx.BLUE, 1, wx.SOLID))
         else:
-            dc.SetBrush(wxBrush(wxWHITE, wxSOLID))
-            dc.SetPen(wxPen(wxWHITE, 1, wxSOLID))
+            dc.SetBrush(wx.Brush(wx.WHITE, wx.SOLID))
+            dc.SetPen(wx.Pen(wx.WHITE, 1, wx.SOLID))
         dc.DrawRectangleRect(rect)
 
         #dc.DrawRectangle((rect.x, rect.y), (rect.width, rect.height))