- long wDialog = 5*LAYOUT_X_MARGIN + wText + wPrompt;
- long hDialog = 2*LAYOUT_Y_MARGIN +
- sizeText.GetHeight() * lines.GetCount() +
- 2*LAYOUT_Y_MARGIN +
- hText +
- 2*LAYOUT_Y_MARGIN +
- sizeBtn.GetHeight() +
- 2*LAYOUT_Y_MARGIN;
+ // 2) prompt and text ctrl
+ wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL );
+ // prompt if any
+ if (!prompt.IsEmpty())
+ inputsizer->Add( new wxStaticText( this, -1, prompt ), 0, wxCENTER | wxLEFT, 10 );
+ // spin ctrl
+ wxString valStr;
+ valStr.Printf(wxT("%lu"), m_value);
+ m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) );
+#ifndef __WIN16__
+ m_spinctrl->SetRange((int)m_min, (int)m_max);
+#endif
+ inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
+ // add both
+ topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );