MacArthur, Ian (SELEX GALILEO, UK) wrote: > Now, here we see that the box colour is hard-coded as > FL_BACKGROUND2_COLOR and there is no mechanism exposed to over-ride > that. > > So... I guess your options are: > > - Try and over-ride FL_BACKGROUND2_COLOR and see if that works, or > > - cut'n'paste the code from Fl_Light_Button.cxx and use that to derive > your own check-button class that *does* allow the box colour to be > tweaked. > > That latter is more work of course (but probably not much more work) and > should allow you to set any box colour you fancy. > Isn't open source good!
And to add a third option: Derive your own class with a draw() method, and in draw(): - save FL_BACKGROUND2_COLOR - set it to what you like (maybe dependent on active_r()) - call Fl_*_Button::draw() - restore FL_BACKGROUND2_COLOR This might be the way of least work and troubles compared to patching the lib (option #4) or writing an own _complete_ draw() method. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

