> But I could be completely wrong with this since you didn't show all
> the relevant code to us. If this doesn't solve your problem, please
> elaborate on what you expect and what you (don't) get from your
> code. E.g. do the cells draw correctly when created, but don't change
> their colors during the runtime, or ... ?
>
> Albrecht


thanks for the help, and yes apologies, the code posted is a mix of the
old method and the new,

The old one (rectangles version)used a single line in the widget draw() method:

DrawBox(int X, int Y, int W, int H, const char*L=0)
   : Fl_Widget(X,Y,W,H,L) {
   }
   void draw() {
     fl_rectf(x(), y(), w(), h(), color());
   }

The runtime drawing update used the method shown in the previous post
DrawWorld();
containing > grp->child(count)->color(n);

The new class at first used hard coded values in the draw method
fl_color(68); //this was the fill
//do polygon
fl_color(0); //this was the line colour
//do line

this worked but placed a load of identical widgets on screen and the
DrawWorld() methodat runtime was not making any difference to the view..
Then i started tinkering around trying to get the widgets to update
thier color, which led to the code fragments i posted.



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

Reply via email to