git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40540
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
protected:
virtual wxSize DoGetBestSize() const;
+ // ensure that the control displays a value in the current range
+ void NormalizeValue() { SetValue(GetValue()); }
+
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSpinButton)
};
void wxSpinCtrl::OnKillFocus(wxFocusEvent& event)
{
- // ensure that the value is shown correctly
- SetValue(GetValue()) ;
+ // ensure that a correct value is shown by the control
+ NormalizeValue();
event.Skip();
}