Allow reparenting wxPropertyGrid(Manager) to work; Show error and suggest calling wxPropertyGrid::OnTLPChanging() if top-level parent changed indirectly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-06-10 20:36:56 +00:00
parent 6de7047076
commit 27c1f235ba
5 changed files with 114 additions and 54 deletions

View File

@@ -528,6 +528,18 @@ void wxPropertyGridManager::SetWindowStyleFlag( long style )
// -----------------------------------------------------------------------
bool wxPropertyGridManager::Reparent( wxWindowBase *newParent )
{
if ( m_pPropGrid )
m_pPropGrid->OnTLPChanging((wxWindow*)newParent);
bool res = wxPanel::Reparent(newParent);
return res;
}
// -----------------------------------------------------------------------
// Actually shows given page.
bool wxPropertyGridManager::DoSelectPage( int index )
{