Index: branches/proxy/src/lib/gui/gl/glgui_box.cc
===================================================================
--- branches/proxy/src/lib/gui/gl/glgui_box.cc	(revision 9607)
+++ branches/proxy/src/lib/gui/gl/glgui_box.cc	(revision 9620)
@@ -36,5 +36,13 @@
   */
   GLGuiBox::~GLGuiBox()
-  {}
+  {
+    // unpack all the widgets.
+    while(!this->_children.empty())
+    {
+      /// not deleting children here.
+      this->_children.front()->setParentWidget(NULL);
+      this->_children.pop_front();
+    }
+  }
 
   /**
@@ -50,5 +58,5 @@
     assert (widget != NULL);
 
-    this->children.push_back(widget);
+    this->_children.push_back(widget);
     widget->setParentWidget(this);
 
@@ -61,9 +69,9 @@
     assert(widget != NULL);
 
-    std::vector<GLGuiWidget*>::iterator delWidget = std::find(this->children.begin(), this->children.end(), widget);
-    if (delWidget != this->children.end())
+    std::list<GLGuiWidget*>::iterator delWidget = std::find(this->_children.begin(), this->_children.end(), widget);
+    if (delWidget != this->_children.end())
     {
       (*delWidget)->setParentWidget(NULL);
-      this->children.erase(delWidget);
+      this->_children.erase(delWidget);
     }
     this->resize();
@@ -72,5 +80,5 @@
   void GLGuiBox::clear()
   {
-    this->children.clear();
+    this->_children.clear();
     this->resize();
   }
@@ -78,6 +86,6 @@
   void GLGuiBox::showAll()
   {
-    std::vector<GLGuiWidget*>::iterator itC = this->children.begin();
-    while (itC != this->children.end())
+    std::list<GLGuiWidget*>::iterator itC = this->_children.begin();
+    while (itC != this->_children.end())
     {
       if ((*itC)->isA(CL_GLGUI_CONTAINER))
@@ -93,6 +101,6 @@
   void GLGuiBox::hideAll()
   {
-    std::vector<GLGuiWidget*>::iterator itC = this->children.begin();
-    while (itC != this->children.end())
+    std::list<GLGuiWidget*>::iterator itC = this->_children.begin();
+    while (itC != this->_children.end())
     {
       if ((*itC)->isA(CL_GLGUI_CONTAINER))
@@ -112,8 +120,8 @@
       float height = borderTop();
       float width = 0.0f;
-      std::vector<GLGuiWidget*>::iterator widget;
+      std::list<GLGuiWidget*>::iterator widget;
 
       // find out how big the Widgets are.
-      for (widget = this->children.begin(); widget != this->children.end(); ++widget)
+      for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
       {
         (*widget)->setRelCoor2D(borderLeft(), height);
@@ -131,8 +139,8 @@
       float height = borderTop();
       float width = borderLeft();
-      std::vector<GLGuiWidget*>::iterator widget;
+      std::list<GLGuiWidget*>::iterator widget;
 
       // find out how big the Widgets are.
-      for (widget = this->children.begin(); widget != this->children.end(); ++widget)
+      for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
       {
         (*widget)->setRelCoor2D(width, borderTop());
@@ -149,5 +157,5 @@
 
     // resize everything.
-    //for (widget = this->children.begin(); widget != this->children.end(); ++widget)
+    //for (widget = this->_children.begin(); widget != this->_children.end(); ++widget)
     //{}
   }
Index: branches/proxy/src/lib/gui/gl/glgui_box.h
===================================================================
--- branches/proxy/src/lib/gui/gl/glgui_box.h	(revision 9607)
+++ branches/proxy/src/lib/gui/gl/glgui_box.h	(revision 9620)
@@ -30,4 +30,7 @@
 
     virtual void pack(GLGuiWidget* widget);
+    void pack(GLGuiWidget* widget, std::list<GLGuiWidget*>::iterator pos);
+    void pack(GLGuiWidget* widget, unsigned int position);
+    //void
     virtual void unpack(GLGuiWidget* widget);
     virtual void clear();
@@ -45,5 +48,5 @@
 
     Orientation                _orientation;
-    std::vector<GLGuiWidget*>  children;
+    std::list<GLGuiWidget*>    _children;
   };
 }
Index: branches/proxy/src/lib/gui/gl/glgui_container.cc
===================================================================
--- branches/proxy/src/lib/gui/gl/glgui_container.cc	(revision 9607)
+++ branches/proxy/src/lib/gui/gl/glgui_container.cc	(revision 9620)
@@ -48,4 +48,10 @@
 
 
+  void GLGuiContainer::removeChildWidget(GLGuiWidget* widget)
+  {
+    this->unpack(widget);
+  }
+
+
   /**
    * draws the GLGuiContainer
Index: branches/proxy/src/lib/gui/gl/glgui_container.h
===================================================================
--- branches/proxy/src/lib/gui/gl/glgui_container.h	(revision 9607)
+++ branches/proxy/src/lib/gui/gl/glgui_container.h	(revision 9620)
@@ -38,4 +38,7 @@
     virtual void draw();
 
+  protected:
+    virtual void removeChildWidget(GLGuiWidget* widget);
+
   private:
     void init();
Index: branches/proxy/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- branches/proxy/src/lib/gui/gl/glgui_widget.cc	(revision 9607)
+++ branches/proxy/src/lib/gui/gl/glgui_widget.cc	(revision 9620)
@@ -79,4 +79,7 @@
     if (this == GLGuiWidget::selected())
       this->unselect();
+
+    if (this->_parent != NULL)
+      this->_parent->removeChildWidget(this);
   }
 
Index: branches/proxy/src/lib/gui/gl/glgui_widget.h
===================================================================
--- branches/proxy/src/lib/gui/gl/glgui_widget.h	(revision 9607)
+++ branches/proxy/src/lib/gui/gl/glgui_widget.h	(revision 9620)
@@ -270,4 +270,7 @@
     virtual void destroying();
 
+    // unparent the widget and from this widget seen as parent
+    virtual void removeChildWidget(GLGuiWidget* widget) {};
+
 
     virtual void debug(unsigned int level) const;
