More wxListCtrl test code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-08-12 17:54:46 +00:00
parent bd43598279
commit 198f875b6c
2 changed files with 6 additions and 0 deletions

View File

@ -221,6 +221,7 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin):
# Show how to reselect something we don't want deselected
def OnItemDeselected(self, evt):
item = evt.GetItem()
print evt.m_itemIndex
if evt.m_itemIndex == 11:
wxCallAfter(self.list.SetItemState, 11, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)

View File

@ -26,6 +26,7 @@ class TestVirtualList(wxListCtrl):
EVT_LIST_ITEM_SELECTED(self, self.GetId(), self.OnItemSelected)
EVT_LIST_ITEM_ACTIVATED(self, self.GetId(), self.OnItemActivated)
EVT_LIST_ITEM_DESELECTED(self, self.GetId(), self.OnItemDeselected)
def OnItemSelected(self, event):
@ -44,6 +45,10 @@ class TestVirtualList(wxListCtrl):
item = self.GetItem(index, col)
return item.GetText()
def OnItemDeselected(self, evt):
print evt.m_itemIndex
#---------------------------------------------------
# These methods are callbacks for implementing the
# "virtualness" of the list...