On 03/26/12 12:55, Rainer Rinke wrote:
> Thanks to Greg for this advice!
> As recommended I inserted just before Fl::run()
> Fl::set_color(FL_BACKGROUND2_COLOR,255,255,255);
> // FL_BACKGROUND2_COLOR is enumerated to 7
> and it works.
> But when I insert it into the last code block of my fluid file it will not
> work, as in the generated *.cxx file I get the sequence:
>
> Fl::set_color(FL_BACKGROUND2_COLOR,255,255,255);
> PMainWindow->show(argc, argv);
> return Fl::run();
>
> Is there any trick to ensure that fluid generates the set_color statement
> after the show(argc,argv) statement?
Yes, I'm guessing if you define your own main(), you can
code the order of these calls precisely as you want. ie:
---------------------------------------------------------------------
1) New -> Function, and then fill out the form:
Name: main(int argc, char *argv[])
Return type: int
2) New -> Code -> Code, and then add:
make_window(); // (I'm assuming this defines PMainWindow..)
PMainWindow->show(argc,argv);
Fl::set_color(FL_BACKGROUND2_COLOR,255,255,255);
return(Fl::run());
---------------------------------------------------------------------
IIRC, win->show(argc,argv) will do colormap stuff (which
is apparently overriding your set_color() call, something
the devs should maybe look into for the Sun platform, as
I would think color #7 should be set to white by default)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk