How to prevent wx.SpinCtrl from rounding value to the range when moving focus from it

I have very simple dialog containing SpinCtrl, ok and cancel buttons. When value entered in the SpinCtrl is above or below the maximum / minimum value after pressing Enter or moving focus from the SpinCtrl the value is rounded to the range. Can this behavior be disabled? If so how?

I don’t think this behavior can be be disabled in wx.SpinCtrl, but you can use a wx.SpinButton next to a wx.TextCtrl to achieve the desired results.