FLTK logo

Re: [fltk.general] Dialog Deletion

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Dialog Deletion matthiasm May 03, 2006  
 

On May 2, 2006, at 9:41 AM, Anonymous wrote:

Is there a precedence that needs to be followed in deleting widgets that were created?

To delete FLTK UI elements, call Fl::delete_widget(my_widget); on the widget that is highest in the hierarchy. If that widget is a child of another, remove it from the parent first ( myWidget->parent()->remove (myWidget); ). Do not call "delete" directly from within a callback, and do not call delete on children of widgets that you delete at the same time. In FLTK, deleteing a parent will atomatically delete all its children.

----
http://robowerk.com/



Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.