Re: How to listen to multi-item selection with wxListCtrl
Igor Korot <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <CA+FnnTxOhyv6Ty_ZGaL5krwK8b-9X3M5kGNdsJBvfcLdKzuEJw@mail.gmail.com> |
Hi, On Thu, Aug 31, 2023, 8:41 AM Andreas Falkenhahn <[email protected]> wrote: > On 29.08.2023 at 19:47 Andreas Falkenhahn wrote: > > > Actually, just adding an additional listener for wxEVT_LIST_ITEM_FOCUSED > > did the trick for me but I only need a solution that works on MSW. > > Hmm, actually, I have now found some cases where listening to > wxEVT_LIST_ITEM_FOCUSED doesn't do the job. But there's not really > anything that could be done about it because it's caused by weird > behaviour of Windows' ListView widget. > > For some reason, Windows sometimes sets the iItem of the NMLISTVIEW > structure to -1 when it sends an LVN_ITEMCHANGED message even though > the message is clearly sent in response to selecting an item with > shift+LMB. When doing so, the clicked item is correctly added to the > selection in the listview widget but still the listview receives an > LVN_ITEMCHANGED message with iItem set to -1 :( > I presume you tried to reproduce it in pure Windows application (Win32)? If that's the case you can try to ping MS about that and see what the say... Thank you. > It only happens in certain situations and I don't understand why > it does but it's clearly reproducible and of course it renders the > wxEVT_LIST_ITEM_FOCUSED workaround useless because it doesn't work > in all cases... sucks, but looks like a Windows problem. > > -- > Best regards, > Andreas Falkenhahn mailto: > [email protected] > > -- > Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. > --- > You received this message because you are subscribed to the Google Groups > "wx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/wx-users/1667226010.20230831154221%40falkenhahn.com > . > -- Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CA%2BFnnTxOhyv6Ty_ZGaL5krwK8b-9X3M5kGNdsJBvfcLdKzuEJw%40mail.gmail.com.