diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 16c4f459d7..d6b17107cb 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -505,9 +505,18 @@ void wxPropertyGridManager::Thaw() void wxPropertyGridManager::SetWindowStyleFlag( long style ) { + int oldWindowStyle = GetWindowStyleFlag(); + wxWindow::SetWindowStyleFlag( style ); m_pPropGrid->SetWindowStyleFlag( (m_pPropGrid->GetWindowStyleFlag()&~(wxPG_MAN_PASS_FLAGS_MASK)) | (style&wxPG_MAN_PASS_FLAGS_MASK) ); + + // Need to re-position windows? + if ( (oldWindowStyle & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) != + (style & (wxPG_TOOLBAR|wxPG_DESCRIPTION)) ) + { + RecreateControls(); + } } // -----------------------------------------------------------------------