More wxUSE_STATTEXT fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2005-03-01 10:59:19 +00:00
parent 001e76a930
commit 132422c4b9
2 changed files with 6 additions and 3 deletions

View File

@@ -108,13 +108,16 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
#if wxUSE_STATTEXT #if wxUSE_STATTEXT
// 1) text message // 1) text message
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 ); topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
#endif
// 2) prompt and text ctrl // 2) prompt and text ctrl
wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *inputsizer = new wxBoxSizer( wxHORIZONTAL );
#if wxUSE_STATTEXT
// prompt if any // prompt if any
if (!prompt.IsEmpty()) if (!prompt.IsEmpty())
inputsizer->Add( new wxStaticText( this, wxID_ANY, prompt ), 0, wxCENTER | wxLEFT, 10 ); inputsizer->Add( new wxStaticText( this, wxID_ANY, prompt ), 0, wxCENTER | wxLEFT, 10 );
#endif #endif
// spin ctrl // spin ctrl
wxString valStr; wxString valStr;
@@ -123,11 +126,9 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
#if wxUSE_SPINCTRL #if wxUSE_SPINCTRL
m_spinctrl->SetRange((int)m_min, (int)m_max); m_spinctrl->SetRange((int)m_min, (int)m_max);
#endif #endif
#if wxUSE_STATTEXT
inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 ); inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
// add both // add both
topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 ); topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
#endif
// smart phones does not support or do not waste space for wxButtons // smart phones does not support or do not waste space for wxButtons
#ifdef __SMARTPHONE__ #ifdef __SMARTPHONE__

View File

@@ -97,8 +97,10 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
#if wxUSE_STATTEXT
// 1) text message // 1) text message
topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) ); topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
#endif
// 2) text ctrl // 2) text ctrl
m_textctrl = new wxTextCtrl(this, wxID_TEXT, value, m_textctrl = new wxTextCtrl(this, wxID_TEXT, value,