On Sat, 23 Oct 2021 15:14:16 -0700 (PDT) Stanislav Tihohod wrote:
ST> But now I want to derive several classes from my panel class and process
ST> wxEVT_SIZE event differently in these classes.
ST> As I understood from the documentation, making OnViewSizeChanged a virtual
ST> function and overloading it in panel-derived classes will not help -
ST> because the code that calls handler ignores virtuality of the handler.
This is actually not true if you're using Bind() (and not the legacy event
table macros), so you could just do this directly and it will work with
overrides in the derived classes.
ST> In general, what happens if I try to bind several handlers to the
ST> same event emitted from the same window?
They will each be called in turn until one of them does _not_ call
event.Skip(). I.e. by default, processing will stop with the first handler,
but if event.Skip() is called, the next one will be called, and if it
doesn't call event.Skip() neither, the next one will be and so on.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/