It's a one threaded application. Calling fltk::flush() right after the deletion doesn't change anything. I wonder why simple redraw() or relayout() doesn't help in this case. It's just when a user clicks on a button I delete the focused child of a PackedGroup. Like already explained, this way doesn't work either:
fltk::Input *i = static_cast<fltk::Input*>(m_pack->child(index)); > delete i; > fltk::flush(); > On 7/2/07, matthiasm <[EMAIL PROTECTED]> wrote: > > > On Jul 2, 2007, at 4:57 PM, Tobias Markmann wrote: > > > Hi, > > > > I have a fltk::PackedGroup which is filled like that: > > > > fltk::PackedGroup *pg = new fltk::PackedGroup(0,0,100,100,""); > >> pg->begin(); > >> new fltk::Input(0,0,100,20,""); > >> new fltk::Input(0,0,100,20,""); > >> new fltk::Input(0,0,100,20,""); > >> new fltk::Input(0,0,100,20,""); > >> new fltk::Input(0,0,100,20,""); > >> pg->end(); > > > > > > When I delete a child using > > > > delete static_cast<fltk::Input>(pg->child(0)); > > > > > > there is no update in the GUI until a resize of the window. Calling > > redraw() > > or relayout() for pg doesn't help either. Any idea how to get it > > updated > > right away? Is this even a good way to delete children from a > > PackedGroup? > > Do you return to the main loop right after calling there deletions? > If not, fltk::flush() will make sure that your changes are redrawn > immediatly. > > ---- > http://robowerk.com/ > > > _______________________________________________ > fltk mailing list > [email protected] > http://lists.easysw.com/mailman/listinfo/fltk > _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

