- valStr.Printf(_T("%lu"), m_value);
- m_spinctrl = new wxTextCtrl(this, -1, valStr,
- wxPoint(x + wPrompt + LAYOUT_X_MARGIN, y),
- wxSize(wText, hText));
- y += hText + 2*LAYOUT_X_MARGIN;
-
- // and buttons
- CreateStandardButtons(wDialog, y, sizeBtn.GetWidth(), sizeBtn.GetHeight());
-
- // set the dialog size and position
- SetClientSize(wDialog, hDialog);
- if ( pos == wxDefaultPosition )
+ 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
+ inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
+ // add both
+ topsizer->Add( inputsizer, 0, wxEXPAND | wxLEFT|wxRIGHT, 5 );
+
+ // 3) buttons if any
+ wxSizer *buttonSizer = CreateButtonSizer( wxOK|wxCANCEL , true, wxLARGESMALL(10,0) );
+ if(buttonSizer->GetChildren().GetCount() > 0 )