#4541: Generate events for multiple selections in virtual wxListCtrl
-----------------------+------------------------------------------------
Reporter: tibosoft | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone: 3.2.0
Component: wxMSW | Version:
Resolution: | Keywords: wxListCtrl virtual selection event
Blocked By: | Blocking:
Patch: 0 |
-----------------------+------------------------------------------------
Old description:
> Hi,
>
> Virtual wxListCtrl for some reason ignore multiple selection events. Bugs
> 1729348, 732104 and 594072 all refer to this problem, and they have been
> closed by stating that this information takes O(n) to fetch.
>
> Under Windows - at least - this is wrong. There exist a message
> (LVN_ODSTATECHANGED) that lets the control know when multiple items are
> selected. Coupling this event with the traditional LVN_ITEMCHANGED would
> let us know the actual selection, even in virtual list controls.
>
> As of now, the [de]selection events are firing, but they are broken. I
> think that they should either be removed completely or fixed (or
> documented as buggy).
>
> I am currently writing a fix, but it requires a new event type that will
> contain the range of items selected with shift+click.
> I'll keep you guys informed how I get on.
>
> However, I don't know how this can be implemented in other ports - GTK,
> Carbon and such. Issues with those ports might have been the reason why
> the operation has been said to take O(n) in the first place.
>
> Thibault
New description:
Hi,
Virtual wxListCtrl for some reason ignore multiple selection events. Bugs
1729348, 732104 and 594072 all refer to this problem, and they have been
closed by stating that this information takes O(n) to fetch.
Under Windows - at least - this is wrong. There exist a message
(LVN_ODSTATECHANGED) that lets the control know when multiple items are
selected. Coupling this event with the traditional LVN_ITEMCHANGED would
let us know the actual selection, even in virtual list controls.
As of now, the [de]selection events are firing, but they are broken. I
think that they should either be removed completely or fixed (or
documented as buggy).
I am currently writing a fix, but it requires a new event type that will
contain the range of items selected with shift+click.
I'll keep you guys informed how I get on.
However, I don't know how this can be implemented in other ports - GTK,
Carbon and such. Issues with those ports might have been the reason why
the operation has been said to take O(n) in the first place.
Thibault
--
Comment (by vadz):
This is clearly important, but it's not that simple to fix because we
first need to decide what exactly to do here, knowing that we ideally we'd
like to not only have consistent behaviour between the different
platforms, but also between `wxListCtrl` and `wxDataViewCtrl`, and then
actually implement it.
I wish I could guarantee I'll do it soon, but I honestly can't do it. I'll
try to do my best, but whether this is going to be enough to do it before
3.2 or not, I have no idea.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/4541#comment:8>