[..]
so I wrote this just to see if it
>       works.. seems to:

Yah, I should have included a test case, sorry.
Add this to what you have:

  void toggle(Fl_Widget*, void* v)
  {
      Fl_Widget* w = static_cast<Fl_Widget*>(v);
      if(w->color() == FL_RED) w->color(FL_GREEN);
      else w->color(FL_RED);
      w->parent()->redraw();
  }
..
      b1->callback(toggle, grp);
      sb1->callback(toggle, sw);

Now, on my system, Button1 toggles the group color; Subbutton1
does nothing.

>
>     In your case, what is causing the group to be redrawn;
>     a change to the contents of the group after the window was opened,
>     or some such?

Basically my class, derived from Fl_Group, in it's draw(),
updates the contents of the subwindow, then
calls Fl_Group::draw().  Which fails to draw the subwindow.
Having discovered the cause, it's easy enough to work around.
It's just surprising, at least to me.

Best,
Stan


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

Reply via email to