how to delete a widget?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Quite a regular
Quite a regular
Posts: 62
Joined: Thu Mar 31, 2005 23:21

how to delete a widget?

Postby rogerdv » Thu Feb 19, 2009 15:09

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?

Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Feb 19, 2009 18:01

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);

Quite a regular
Quite a regular
Posts: 60
Joined: Tue Oct 28, 2008 10:46

Postby songge3604 » Mon Feb 23, 2009 14:57

When you delete a widget, make sure you are not using it, for example, when you moving a picture, deleting it will crash.

Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests