#ifdef __WXGTK24__
#include "wx/collpane.h"
+#include "wx/gtk/private.h"
#include <gtk/gtkexpander.h>
-#include <gtk/gtk.h>
const wxChar wxCollapsiblePaneNameStr[] = wxT("CollapsiblePane");
sz = p->m_szCollapsed;
}
- // minimal size has priority over the best size so set here our min size
- p->SetMinSize(sz);
- p->SetSize(sz);
-
- wxWindow *top = p->GetTopLevelParent();
- if (top)
- {
- // we've changed our size, thus our top level parent needs to relayout
- // itself
- top->Layout();
-
- if (p->IsExpanded())
- {
- // force our parent to "fit", i.e. expand so that it can honour
- // our minimal size
- top->Fit();
- }
- else // correctly
- {
- if (top->GetSizer())
- top->GetSizer()->SetSizeHints(top);
-
- // use SetClientSize() and not SetSize() otherwise the size for
- // e.g. a wxFrame with a menubar wouldn't be correctly set
- top->SetClientSize(sz);
- }
- }
+ p->OnStateChange(sz);
if ( p->m_bIgnoreNextChange )
{
void wxCollapsiblePane::SetLabel(const wxString &str)
{
if (!gtk_check_version(2,4,0))
- gtk_expander_set_label(GTK_EXPANDER(m_widget), str.c_str());
+ gtk_expander_set_label(GTK_EXPANDER(m_widget), wxGTK_CONV(str));
else
wxGenericCollapsiblePane::SetLabel(str);
}