Page 1 of 1
how to delete a widget?
Posted: Thu Feb 19, 2009 15:09
by rogerdv
I need to remove some buttons from a widgets and recreate them again. But I have found some crashes, so I would like to know if there is some special procedure to delete a widget. Right now I first remove them from the parent widget and then use delete. Do I need to do something else?
Posted: Thu Feb 19, 2009 18:01
by Pompei2
I don't know what you mean by saying "widget", but you should delete any CEGUI::Window based object not by deleting it yourself but rather by using
CEGUI::WindowManager::destroyWindow(CEGUI::Window *); or CEGUI::WindowManager::destroyWindow(CEGUI::String);
Posted: Mon Feb 23, 2009 14:57
by songge3604
When you delete a widget, make sure you are not using it, for example, when you moving a picture, deleting it will crash.