}
else
{
- if ( IsWindow() )
+ if ( IsWindow() && !(m_flag & wxFIXED_MINSIZE) )
{
- // the size of the window may change during run-time, we should
- // use the current minimal size
- m_minSize = m_window->GetAdjustedBestSize();
+ // Since the size of the window may change during runtime, we
+ // should use the current minimal size. If there is a MinSize,
+ // use it, otherwise use the BestSize.
+ wxSize min = m_window->GetMinSize();
+ wxSize best = m_window->GetBestSize();
+ if (min.x == -1) min.x = best.x;
+ if (min.y == -1) min.y = best.y;
+ m_minSize = min;
}
ret = m_minSize;
void wxSizerItem::DeleteWindows()
{
if (m_window)
+ {
m_window->Destroy();
+ m_window = NULL;
+ }
if (m_sizer)
m_sizer->DeleteWindows();
if (item->GetWindow() == window)
{
- item->SetInitSize( width, height );
+ item->SetMinSize( width, height );
return true;
}
node = node->GetNext();
else
{
// ... but the minimal size of spacers and windows in stored in them
- item->SetInitSize( width, height );
+ item->SetMinSize( width, height );
}
return true;
return ret;
}
+void wxStaticBoxSizer::ShowItems( bool show )
+{
+ m_staticBox->Show( show );
+ wxBoxSizer::ShowItems( show );
+}
+
#endif // wxUSE_STATBOX
// ----------------------------------------------------------------------------