Re: How to listen to multi-item selection with wxListCtrl
Andreas Falkenhahn <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
On 31.08.2023 at 15:59 Carlos Azevedo wrote: > According to > https://learn.microsoft.com/en-us/windows/win32/controls/lvn-itemchangedyou > may need to handle the LVN_ODSTATECHANGED notification. Oh, indeed, thanks a lot! That saves the day. I have modified wxWidgets now to send wxEVT_LIST_ITEM_FOCUSED on LVN_ODSTATECHANGED as well and this does the trick. Of course that wxEVT_LIST_ITEM_FOCUSED is just a dummy event that contains no real item information but my app doesn't need that anyway. I just need to learn about selection changes and sending wxEVT_LIST_ITEM_FOCUSED on LVN_ODSTATECHANGED seems to serve that purpose. Still, it's all very weird because most of the time LVN_ITEMCHANGED comes in as well with correct item information. It's just in some very isolated cases that iItem is -1 for LVN_ITEMCHANGED and in that case LVN_ODSTATECHANGED is sent. So no idea what's really going on. -- 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/1581107038.20230831163207%40falkenhahn.com.