demo: ListCtrl_virtual: OnItemDeselected does not work

Martin Landa wrote:

Hi all,

it seems to me that wx.EVT_LIST_ITEM_DESELECTED does not work in
ListCtrl_virtual demo app (2.8.6.1 on Debian GNU/Linux). OnSelectItem
works OK, OnDeselectItem is not called when item is deselected... In
demo app for ListCTRL everything works OK. Can anyone confirm this
behaviour. I wonder how to enable wx.EVT_LIST_ITEM_DESELECTED event
for virtual ListCtrl...

In general, in a virtual listctrl anything that can potentially cause all the items to be visited, or events to be sent for all items, will be ignored. Since there can be billions of items you really do not want it sending that many events.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hi,

Martin Landa wrote:
> Hi all,
>
> it seems to me that wx.EVT_LIST_ITEM_DESELECTED does not work in
> ListCtrl_virtual demo app (2.8.6.1 on Debian GNU/Linux). OnSelectItem
> works OK, OnDeselectItem is not called when item is deselected... In
> demo app for ListCTRL everything works OK. Can anyone confirm this
> behaviour. I wonder how to enable wx.EVT_LIST_ITEM_DESELECTED event
> for virtual ListCtrl...

In general, in a virtual listctrl anything that can potentially cause
all the items to be visited, or events to be sent for all items, will be
ignored. Since there can be billions of items you really do not want it
sending that many events.

well, it make sense to me. I just didn't find any note about this.
Moreover wx.EVT_LIST_ITEM_DESELECTED is used in demo without
clarification (maybe I missed something).

Thanks, Martin

···

2007/11/15, Robin Dunn <robin@alldunn.com>:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *