wxControl::wxControl()
{
m_needParent = TRUE;
- m_createComplete = false;
}
bool wxControl::Create( wxWindow *parent,
const wxValidator& validator,
const wxString &name )
{
- m_createComplete = false;
bool ret = wxWindow::Create(parent, id, pos, size, style, name);
#if wxUSE_VALIDATORS
}
m_label << *pc;
}
-}
-
-void wxControl::PostSetLabel()
-{
- // make sure the widget has been created, and that PostCreate has already
- // been called
- if (m_widget && m_createComplete && GetAdjustMinSizeFlag())
- SetBestSize(wxDefaultSize);
+ InvalidateBestSize();
}
wxString wxControl::GetLabel() const
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_widget) )->size_request )
(m_widget, &req );
- return wxSize(req.width, req.height);
+ wxSize best(req.width, req.height);
+ CacheBestSize(best);
+ return best;
}
InheritAttributes();
ApplyWidgetStyle();
SetInitialBestSize(size);
- m_createComplete = true;
}