fix setting the initial value when it's not in the default 0..100 range [backport of r53550 from trunk]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -104,10 +104,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 );
|
||||
|
Reference in New Issue
Block a user