Kirix Support Forums

wxAuiNotebook::InsertPage() do not update the parent of the

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

wxAuiNotebook::InsertPage() do not update the parent of the

Postby andrey_yazhuk on Tue Aug 07, 2007 4:19 pm

Hello,

If a window is not a child window of wxAuiNotebook then calling wxAuiNotebook::AddPage(window) / InsertPage(window) results in inconsistent state – GetParent() for the child window will still return the old value, but the notebook will try to manage it as its own child.

Adding the following line

page->Reparent(this);

to wxAuiNotebook::InsertPage() should fix the problem.

This issues is also submitted to wxWidgets bug tracker
https://sourceforge.net/tracker/index.p ... tid=109863

Andrey Yazhuk
andrey_yazhuk
Registered User
 
Posts: 4
Joined: Tue Aug 07, 2007 4:01 pm

Re: wxAuiNotebook::InsertPage() do not update the parent of the

Postby Ben on Wed Aug 08, 2007 2:42 pm

Hi,

Yes, this sounds like a good idea. Thanks for the recommendation.

Best,
Ben
Ben Williams
Kirix Support Team
User avatar
Ben
Kirix Support Team
 
Posts: 522
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback