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

@@ -893,6 +893,20 @@ public:
*/
bool IsFrozen() const { return (m_frozen>0)?true:false; }
/**
Call this any time your code causes wxPropertyGrid's top-level parent
to change.
@param newTLP
New top-level parent that is about to be set. Old top-level parent
window should still exist as the current one.
@remarks This function is automatically called from wxPropertyGrid::
Reparent() and wxPropertyGridManager::Reparent(). You only
need to use it if you reparent wxPropertyGrid indirectly.
*/
void OnTLPChanging( wxWindow* newTLP );
/** Redraws given property.
*/
virtual void RefreshProperty( wxPGProperty* p );
@@ -1416,7 +1430,7 @@ public:
virtual void Freeze();
virtual void SetExtraStyle( long exStyle );
virtual void Thaw();
virtual bool Reparent( wxWindowBase *newParent );
protected:
virtual wxSize DoGetBestSize() const;
@@ -1606,10 +1620,7 @@ protected:
// handling mess).
wxWindow* m_curFocused;
// wxPGTLWHandler
wxEvtHandler* m_tlwHandler;
// Top level parent
// Last known top-level parent
wxWindow* m_tlp;
// Sort function
@@ -1715,6 +1726,8 @@ protected:
void OnSysColourChanged( wxSysColourChangedEvent &event );
void OnTLPClose( wxCloseEvent& event );
protected:
/**