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 28.08.2023 at 23:24 Vadim Zeitlin wrote: > Typically the UI doesn't need to change on every selection change in a > multi-select wxListCtrl, but if you do, you probably need to do it from > wxEVT_IDLE handler and examine the selection all the time. This is heavy > but should work reliably. 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. I currently don't care about the other platforms for this particular feature so wxEVT_LIST_ITEM_FOCUSED seemed to be a sufficient workaround. Of course it's also necessary to listen to wxEVT_LIST_ITEM_SELECTED and wxEVT_LIST_ITEM_DESELECTED as well but listening to those three events seems to cover all cases on MSW AFAICS. -- 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/912263987.20230829194703%40falkenhahn.com.