Am 13.04.2009 3:29 Uhr schrieb "pawel" unter <[email protected]>:

>> It works just fine here... .
>     void edit_cb2() {
Add here:
          this->begin();
>         edit = new Fl_Group(110, 20, w()-120, h()-30);
Remove the following line:
>         this->add(edit);
>         edit->box(FL_BORDER_BOX);
>         ...
>         edit->redraw();
> 
You are creating a local variable here. As soon as you leave the function,
your window will be out of scope and automatically deleted.
>         Fl_Window sub(130, 30, 100, 100, "sub");
Instead try:
          Fl_Window *sub = new Fl_Window(130, 30, 100, 100, "sub"); ... Etc.
>         sub.color(FL_WHITE); // add a background color
>         sub.end();
> 
>         edit->end();
>         sub.show();
>       }

Try this:

Void ...() {
  this->begin();
  edit = new Fl_Group(...)
   







_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to