mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-20 22:06:25 +08:00
Reconnect events to the widget after recreating it in the sample
This ensures that the expected events are given even after the widget is recreated due to a change of some controls on its page (and not because it's recreated by one of the menu commands in the parent frame). We also don't need to connect to these events from WidgetsFrame any longer (and, in fact, doing it would be wrong as we'd connect twice), which simplifies its code.
This commit is contained in:
@@ -308,6 +308,8 @@ void NativeWidgetsPage::RecreateWidget()
|
||||
delete m_nativeWindow;
|
||||
m_nativeWindow = new NativeWindow(this);
|
||||
|
||||
NotifyWidgetRecreation(m_nativeWindow);
|
||||
|
||||
m_sizerCtrl->Clear();
|
||||
if ( m_chkExpand->IsChecked() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user