]> git.saurik.com Git - wxWidgets.git/commitdiff
expand the collapsible panes contents to fill the entire pane area (see #11004)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Jul 2009 17:24:15 +0000 (17:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 19 Jul 2009 17:24:15 +0000 (17:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/aboutdlgg.cpp

index 70f158262270c1a6591efdac29d8d1c8fa2d0dba..03edc08ab06b7779edfcb08a29c5a7d625c8e1b2 100644 (file)
@@ -223,7 +223,8 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
                                               const wxString& text)
 {
     wxCollapsiblePane *pane = new wxCollapsiblePane(this, wxID_ANY, title);
-    wxStaticText *txt = new wxStaticText(pane->GetPane(), wxID_ANY, text,
+    wxWindow * const paneContents = pane->GetPane();
+    wxStaticText *txt = new wxStaticText(paneContents, wxID_ANY, text,
                                          wxDefaultPosition, wxDefaultSize,
                                          wxALIGN_CENTRE);
 
@@ -231,6 +232,12 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
     static const int maxWidth = wxGetDisplaySize().x/3;
     txt->Wrap(maxWidth);
 
+
+    // we need a sizer to make this text expand to fill the entire pane area
+    wxSizer * const sizerPane = new wxBoxSizer(wxHORIZONTAL);
+    sizerPane->Add(txt, wxSizerFlags(1).Expand());
+    paneContents->SetSizer(sizerPane);
+
     // NB: all the wxCollapsiblePanes must be added with a null proportion value
     m_sizerText->Add(pane, wxSizerFlags(0).Expand().Border(wxBOTTOM));
 }