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:
parent
bd43598279
commit
198f875b6c
@ -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)
|
||||
|
||||
|
@ -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...
|
||||
|
Loading…
Reference in New Issue
Block a user