How to temporarily disable an event handler
Andreas Falkenhahn <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
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);
What's the recommended way to temporarily disable event handlers like wxEVT_LIST_ITEM_SELECTED?
--
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/539402955.20230829215214%40falkenhahn.com.