]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GridStdEdRend.py
added missing button state
[wxWidgets.git] / wxPython / demo / GridStdEdRend.py
index ea84545ce8a8db8499bb55c4d3294d4ef54945f1..6a89c3e122ec869c235524aa632fa14160a65716 100644 (file)
@@ -1,8 +1,3 @@
-# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# o Updated for V2.5
-# o There is one wx.Size() I haven't figured out how to get rid of yet.
-#
 
 import  random
 
 
 import  random
 
@@ -16,9 +11,9 @@ class MyCustomRenderer(gridlib.PyGridCellRenderer):
         gridlib.PyGridCellRenderer.__init__(self)
 
     def Draw(self, grid, attr, dc, rect, row, col, isSelected):
         gridlib.PyGridCellRenderer.__init__(self)
 
     def Draw(self, grid, attr, dc, rect, row, col, isSelected):
-        dc.SetBackgroundMode(wxSOLID)
-        dc.SetBrush(wxBrush(wxBLACK, wxSOLID))
-        dc.SetPen(wxTRANSPARENT_PEN)
+        dc.SetBackgroundMode(wx.SOLID)
+        dc.SetBrush(wx.Brush(wx.BLACK, wx.SOLID))
+        dc.SetPen(wx.TRANSPARENT_PEN)
         dc.DrawRectangleRect(rect)
 
         dc.SetBackgroundMode(wx.TRANSPARENT)
         dc.DrawRectangleRect(rect)
 
         dc.SetBackgroundMode(wx.TRANSPARENT)
@@ -31,7 +26,7 @@ class MyCustomRenderer(gridlib.PyGridCellRenderer):
 
         for ch in text:
             dc.SetTextForeground(random.choice(colors))
 
         for ch in text:
             dc.SetTextForeground(random.choice(colors))
-            dc.DrawText(ch, (x, y))
+            dc.DrawText(ch, x, y)
             w, h = dc.GetTextExtent(ch)
             x = x + w
             if x > rect.right - 5:
             w, h = dc.GetTextExtent(ch)
             x = x + w
             if x > rect.right - 5: