]> git.saurik.com Git - wxWidgets.git/commitdiff
Show using GetAtter in wxPyGridTbaleBase
authorRobin Dunn <robin@alldunn.com>
Wed, 19 Nov 2003 06:41:12 +0000 (06:41 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 19 Nov 2003 06:41:12 +0000 (06:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/GridHugeTable.py

index a2084fb6e32ca11b14c3d951c6764bc68bdc3b01..87bcc3279bca795a0178b7fffdf71c522cb2498d 100644 (file)
@@ -16,6 +16,16 @@ class HugeTable(wxPyGridTableBase):
         wxPyGridTableBase.__init__(self)
         self.log = log
 
+        self.odd=wxGridCellAttr()
+        self.odd.SetBackgroundColour("sky blue")
+        self.even=wxGridCellAttr()
+        self.even.SetBackgroundColour("sea green")
+
+     def GetAttr(self, row, col, kind):
+        attr = [self.even, self.odd][row % 2]
+        attr.IncRef()
+        return attr
+
     def GetNumberRows(self):
         return 10000