diff --git a/samples/widgets/static.cpp b/samples/widgets/static.cpp index abb59ca2c8..cded6d1d07 100644 --- a/samples/widgets/static.cpp +++ b/samples/widgets/static.cpp @@ -525,13 +525,10 @@ void StaticWidgetsPage::CreateStatic() #endif // wxUSE_MARKUP } - NotifyWidgetRecreation(m_statText); m_statText->SetToolTip("Tooltip for a label inside the box"); #if wxUSE_MARKUP - NotifyWidgetRecreation(m_statMarkup); - m_statMarkup->SetLabelMarkup(m_textLabelWithMarkup->GetValue()); if ( m_chkGreen->GetValue() ) @@ -542,8 +539,6 @@ void StaticWidgetsPage::CreateStatic() m_statLine = new wxStaticLine(staticBox, wxID_ANY, wxDefaultPosition, wxDefaultSize, isVert ? wxLI_VERTICAL : wxLI_HORIZONTAL); - - NotifyWidgetRecreation(m_statLine); #endif // wxUSE_STATLINE m_sizerStatBox->Add(m_statText, 0, wxGROW); @@ -554,6 +549,14 @@ void StaticWidgetsPage::CreateStatic() m_sizerStatBox->Add(m_statMarkup); #endif // wxUSE_MARKUP + NotifyWidgetRecreation(m_statText); +#if wxUSE_MARKUP + NotifyWidgetRecreation(m_statMarkup); +#endif +#if wxUSE_STATLINE + NotifyWidgetRecreation(m_statLine); +#endif + m_sizerStatic->Add(m_sizerStatBox, 0, wxGROW); m_sizerStatic->Layout();