X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7e7022c2c800a01e0b95d371fb213b0d25e3214..edb89f7e356761b4fbdaebb8b5ebd5c7a7643da7:/wxPython/demo/VirtualListCtrl.py diff --git a/wxPython/demo/VirtualListCtrl.py b/wxPython/demo/VirtualListCtrl.py index 96a20d06b8..424d108abb 100644 --- a/wxPython/demo/VirtualListCtrl.py +++ b/wxPython/demo/VirtualListCtrl.py @@ -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 #----------------------------------------------------------------------