Page 1 of 1

Destroy a window with all children

Posted: Wed Sep 08, 2004 19:43
by mac
Is it possible to destroy a window and have all child windows destroyed also?

I'm using:

Code: Select all

WindowManager::getSingleton().destroyWindow( win );


which only removes win.

Must I take care of all the elements (buttons, texts, editboxes...) belonging to the window myself?

Cheers,
mac

Destroy a window with all children

Posted: Wed Sep 08, 2004 20:33
by CrazyEddie
It is the default behaviour for a window to clean up all attached children. Normally the only time this does not happen is if you have disabled the option on a child window by setting the 'DestroyedByParent' setting to false. How are you determining that the children are not being destroyed?

Any further information would be helpful :)

CE.

Destroy a window with all children

Posted: Thu Sep 09, 2004 10:23
by mac
Sorry for the wrong information.

I wanted to recreate (create, destroy, create...) a TabControl (Panel) - and the problem was, that the button that belongs to it wasn't destroyed.

I tried a simple example with a "normal" window and everything is fine.

Thanks for the quick response. Sometimes it helps when somebody just listens... ;)
mac

Destroy a window with all children

Posted: Thu Sep 09, 2004 13:59
by CrazyEddie
Cool, no problemo :) We're here to listen :D