3 from wxPython
.wx
import *
5 #----------------------------------------------------------------------
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
)
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)
20 self
.SetItemCount(1000000)
25 def OnGetItemText(self
, item
, col
):
26 return "Item %d, column %d" % (item
, col
)
28 def OnGetItemImage(self
, item
):
31 def OnGetItemAttr(self
, item
):
35 #----------------------------------------------------------------------
37 def runTest(frame
, nb
, log
):
38 win
= TestVirtualList(nb
, log
)
41 #----------------------------------------------------------------------