Hi,
On Tue, Aug 29, 2023 at 2:51 PM Andreas Falkenhahn
<
and...@falkenhahn.com> wrote:
>
> I'm listening to wxEVT_LIST_ITEM_SELECTED for my wxListCtrl. That event also triggers when my app calls the Select() method to select an item. What is the typical way to prevent Select() from firing the event? Should I simply unbind and then bind again or how is this typically done? E.g. should I do something like this: (pseudo-code)
>
> lv->Unbind(wxEVT_LIST_ITEM_SELECTED);
> lv->Select(item);
> lv->Bind(wxEVT_LIST_ITEM_SELECTED);
This should work just fine.
Do you have any issues with that?
Thank you.
>
> What's the recommended way to temporarily disable event handlers like wxEVT_LIST_ITEM_SELECTED?
>
> --
> Best regards,
> Andreas Falkenhahn mailto:
and...@falkenhahn.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
wx-users+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/wx-users/539402955.20230829215214%40falkenhahn.com.