X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd9f3519cf4d3adec765a932a726e2f1d34e0df9..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/generic/numdlgg.cpp diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp index 615b64ba0f..98e5c16734 100644 --- a/src/generic/numdlgg.cpp +++ b/src/generic/numdlgg.cpp @@ -77,7 +77,8 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, long min, long max, const wxPoint& pos) - : wxDialog(parent, wxID_ANY, caption, + : wxDialog(GetParentForModalDialog(parent), + wxID_ANY, caption, pos, wxDefaultSize) { m_value = value; @@ -104,10 +105,7 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, // spin ctrl wxString valStr; valStr.Printf(wxT("%ld"), m_value); - m_spinctrl = new wxSpinCtrl(this, wxID_ANY, valStr, wxDefaultPosition, wxSize( 140, wxDefaultCoord ) ); -#if wxUSE_SPINCTRL - m_spinctrl->SetRange((int)m_min, (int)m_max); -#endif + m_spinctrl = new wxSpinCtrl(this, wxID_ANY, valStr, wxDefaultPosition, wxSize( 140, wxDefaultCoord ), wxSP_ARROW_KEYS, (int)m_min, (int)m_max, (int)m_value); inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); // add both topsizer->Add( inputsizer, 0, wxEXPAND | wxLEFT|wxRIGHT, 5 );