Page 1 of 1

wxSpinCtrl & wxWidgets 3.0.2

Posted: Mon Mar 09, 2015 11:05 am
by nezos
In case someone else will come up with this:

For wxWidgets 3.0.2 the wxEVT_COMMAND_SPINCTRL_UPDATED does not fire, by checking the header file the event to be used is wxEVT_SPINCTRL

Use the ObjectEventFunction with the argument (wxSpinEvent& event).

Re: wxSpinCtrl & wxWidgets 3.0.2

Posted: Mon Mar 09, 2015 12:31 pm
by eranif
Strange, from the source files there is a backward compatibility code (include\wx\spinctrl.h):

Code: Select all

// old wxEVT_COMMAND_* constants
#define wxEVT_COMMAND_SPINCTRL_UPDATED         wxEVT_SPINCTRL

So it should be fired..

Eran

Re: wxSpinCtrl & wxWidgets 3.0.2

Posted: Mon Mar 09, 2015 2:36 pm
by nezos
You are right it's not the event wxEVT_COMMAND_SPINCTRL_UPDATED.

It is the function that needs to have as argument (wxSpinEvent& event). Try to compile it with (wxCommandEvent &event) and it will fail (bind it not in the base class but in the derived).