X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..56d85ddeece939e0d2cf602a45286e8368544320:/samples/collpane/collpane.cpp diff --git a/samples/collpane/collpane.cpp b/samples/collpane/collpane.cpp index fccfa6a56f..27cccb9f77 100644 --- a/samples/collpane/collpane.cpp +++ b/samples/collpane/collpane.cpp @@ -6,7 +6,7 @@ // Created: 14/10/06 // RCS-ID: $Id$ // Copyright: (c) Francesco Montorsi -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -44,7 +44,7 @@ #include "wx/fontpicker.h" #include "wx/aboutdlg.h" -#ifndef __WXMSW__ +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -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 ); }