]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/VirtualListCtrl.py
Don't create a bitmap with dimensions <= 0...
[wxWidgets.git] / wxPython / demo / VirtualListCtrl.py
index 96a20d06b85f241ce7177b111593774ae36ec9fe..424d108abbaa4ebba59ba96f0aa357d9661511ec 100644 (file)
@@ -19,7 +19,11 @@ class TestVirtualList(wxListCtrl):
 
         self.SetItemCount(1000000)
 
+        self.attr1 = wxListItemAttr()
+        self.attr1.SetBackgroundColour("yellow")
 
+        self.attr2 = wxListItemAttr()
+        self.attr2.SetBackgroundColour("light blue")
 
 
     def OnGetItemText(self, item, col):
@@ -29,7 +33,12 @@ class TestVirtualList(wxListCtrl):
         return 0
 
     def OnGetItemAttr(self, item):
-        return None
+        if item % 3 == 1:
+            return self.attr1
+        elif item % 3 == 2:
+            return self.attr2
+        else:
+            return None
 
 
 #----------------------------------------------------------------------