Is it possible to add a validator to a wxSpinCtrl?

Is it possible to define a validator to a wxSpinCtrl?
The constructor does accept 'validator='

Is it possible to add the validator after the wxSpinCtrl has been created?

Thanks.

···

--

Pierre Rouleau

Pierre_Rouleau@ImpathNetworks.com wrote:

Is it possible to define a validator to a wxSpinCtrl?
The constructor does accept 'validator='

Is it possible to add the validator after the wxSpinCtrl has been created?

You can call SetValidator after creation. But since it is a composite control it may not behave entirely as expected so you may want to instead use a separate wxSpinButton and a wxTextCtrl.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!