Don't recreate wxHyperlinkCtrl in widgets sample unnecessarily

There is no need to do this after just changing its label or URL, this
shouldn't, and doesn't require full control recreation.
This commit is contained in:
Vadim Zeitlin
2024-11-29 17:26:33 +01:00
parent 5ff83b400c
commit 441bc006da
-2
View File
@@ -347,13 +347,11 @@ void HyperlinkWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event))
void HyperlinkWidgetsPage::OnButtonSetLabel(wxCommandEvent& WXUNUSED(event))
{
m_hyperlink->SetLabel(m_label->GetValue());
CreateHyperlink();
}
void HyperlinkWidgetsPage::OnButtonSetURL(wxCommandEvent& WXUNUSED(event))
{
m_hyperlink->SetURL(m_url->GetValue());
CreateHyperlink();
}
void HyperlinkWidgetsPage::OnAlignment(wxCommandEvent& WXUNUSED(event))