]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/VirtualListCtrl.py
nicer version compilation fix for wxUSE_WCHAR_T=0 (why should we duplicate definition...
[wxWidgets.git] / wxPython / demo / VirtualListCtrl.py
1
2
3 from wxPython.wx import *
4
5 #----------------------------------------------------------------------
6
7 class TestVirtualList(wxListCtrl):
8 def __init__(self, parent, log):
9 wxListCtrl.__init__(self, parent, -1,
10 style=wxLC_REPORT|wxLC_VIRTUAL|wxLC_HRULES|wxLC_VRULES)
11 self.log = log
12
13 self.InsertColumn(0, "First")
14 self.InsertColumn(1, "Second")
15 self.InsertColumn(2, "Third")
16 self.SetColumnWidth(0, 175)
17 self.SetColumnWidth(1, 175)
18 self.SetColumnWidth(2, 175)
19
20 self.SetItemCount(1000000)
21
22
23
24
25 def OnGetItemText(self, item, col):
26 return "Item %d, column %d" % (item, col)
27
28 def OnGetItemImage(self, item):
29 return 0
30
31 def OnGetItemAttr(self, item):
32 return None
33
34
35 #----------------------------------------------------------------------
36
37 def runTest(frame, nb, log):
38 win = TestVirtualList(nb, log)
39 return win
40
41 #----------------------------------------------------------------------
42
43
44
45
46
47
48
49
50 overview = """\
51 """