[wx 2.8.4, GTK+ 2, g++] Problem updating value of wxSpinCtrl
in wxSpinEvent
Robert Roebling
robert at roebling.de
Tue Jul 10 04:26:56 PDT 2007
Francesco Montorsi wrote:
> Frank Bennewitz ha scritto:
>
> > Hi Francesco,
> >
> > I tried this:
> >
> > void MyFrame::OnGaussSpin(wxSpinEvent &event) {
> >
> > //Hier muss die Behandlung der Werte rein: es dürfen nur ungerade Integer sein.
> >
> > wxSpinCtrl *m_pMySpinCtrl= (wxSpinCtrl*)FindWindowById(PANEL_GAUSS_SPIN);
> > int val=event.GetPosition();
> > m_pMySpinCtrl->SetValue(val-2);
> > }
> >
> > The Problem is (I guess) that after m_pMySpinCtrl->SetValue(val-2) is
> > called, another EVT_SPINCTRL is fired
>
> this is a "bug". Either in the documentation or in wxSpinCtrl.
If another event really is fired, we need to block it.
Robert
More information about the wx-users
mailing list