Improve layout in the samples to avoid problems under Mac.

Changes the samples to look better under Mac and avoid the worst problems such
as overlapping buttons or truncated controls.

Closes #11651.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-28 13:51:21 +00:00
parent 7f3f059ac5
commit d159e96495
4 changed files with 97 additions and 36 deletions

View File

@@ -198,11 +198,16 @@ MyFrame::MyFrame()
m_collPane = new wxCollapsiblePane(this, -1, wxT("test!"));
wxWindow *win = m_collPane->GetPane();
m_paneSizer = new wxBoxSizer( wxVERTICAL );
m_paneSizer->Add( new wxStaticText(win, -1, wxT("Static text") ), 0, wxALIGN_LEFT );
m_paneSizer->Add( new wxStaticText(win, -1, wxT("Yet another one!") ), 0, wxALIGN_LEFT );
m_paneSizer->Add( new wxTextCtrl(win, PANE_TEXTCTRL, wxT("Text control"), wxDefaultPosition, wxSize(80,-1) ), 0, wxALIGN_LEFT );
m_paneSizer->Add( new wxButton(win, PANE_BUTTON, wxT("Press to align right") ), 0, wxALIGN_LEFT );
m_paneSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* paneSubSizer = new wxBoxSizer( wxVERTICAL );
m_paneSizer->AddSpacer( 20 );
m_paneSizer->Add( paneSubSizer, 1 );
paneSubSizer->Add( new wxStaticText(win, -1, wxT("Static text") ), 0, wxALIGN_LEFT | wxALL, 3 );
paneSubSizer->Add( new wxStaticText(win, -1, wxT("Yet another one!") ), 0, wxALIGN_LEFT | wxALL, 3 );
paneSubSizer->Add( new wxTextCtrl(win, PANE_TEXTCTRL, wxT("Text control"), wxDefaultPosition, wxSize(80,-1) ), 0, wxALIGN_LEFT | wxALL, 3 );
paneSubSizer->Add( new wxButton(win, PANE_BUTTON, wxT("Press to align right") ), 0, wxALIGN_LEFT | wxALL, 3 );
win->SetSizer( m_paneSizer );
}