X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c71830c3b63568566cf5f006165e51ffaee0c704..794bcc2dea743ac907b839f54e451847c9ea4b72:/include/wx/generic/spinctlg.h diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 288758c6f0..f9f01943ce 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -44,11 +44,13 @@ public: int min = 0, int max = 100, int initial = 0, const wxString& name = _T("wxSpinCtrl")) { - SetValue(initial); SetRange(min, max); - return wxTextCtrl::Create(parent, id, value, pos, size, style, - wxDefaultValidator, name); + bool ok = wxTextCtrl::Create(parent, id, value, pos, size, style, + wxDefaultValidator, name); + SetValue(initial); + + return ok; } // accessors