- // unfortunately there's no clean way to retrieve the minimal size of
- // the expanded pane in this handler or in other handlers for the
- // signals generated by user clicks on the GtkExpander button:
- // p->GetBestSize() or p->GetMinSize() would still return the size for
- // the collapsed expander even if the collapsed->expanded transition
- // has already been completed (this because GTK+ queues some resize
- // calls which still must be processed). So, the only solution to
- // correctly set the size hints for this window is to calculate the
- // expanded size ourselves, without relying on p->Get[Best|Min]Size:
- sz = p->GetMinSize();
- sz.SetWidth(wxMax(sz.x, p->GetPane()->GetMinSize().x));
- sz.SetHeight(sz.y + p->GetPane()->GetMinSize().y + 10);
- }
- else // collapsed
- {
- // same problem described above: using p->Get[Best|Min]Size() here we
- // would get the size of the control when it is expanded even if the
- // expanded->collapsed transition should be complete now...
- // So, we use the size cached at control-creation time...
- sz = p->m_szCollapsed;