MacArthur, Ian (SELEX GALILEO, UK) schrieb:
>> If have an FLTK-GUI with a black background and some widgets
>> on it.
>
> OK. I understand you are doing some sort of embedded UI, so that maube
> makes sense, but can I just say "Eww, yuck!" at this point anyway...!
> ;-)
>
>> Now,
>> if I edit an input field I deactivate all the other widgets.
>> This works
>> fine. But the colors don't look very well.
>>
>> For example the FL_CHECK_BUTTON: If I deactivate the label gets mor
>> contrast and is changed from white to gray, this is fine. But the
>> "checkfield" itself (where I can set the hook) stays white. And this
>> realy shines out! Is there a way to customize deactivate() that the
>> check field itself also gets darker?
>> As a workaround I could also define the checkfield just gray, but I
>> didn't find a way to modify this color
>
>
> Yup, this might be a tricky one... For reasons that might not be at all
> obvious from the outside, the check button is actually drawn by
> Fl_Light_Button.cxx (Fl_Check_Button is a subclass of Fl_Light_Button)
> and so that code draws the check box, at or around line 60 of the file
> Fl_Light_Button.cxx.
>
> 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
Tried it allready... makes no difference :-(
Are you sure that it should work? Maybe I'm doing something wrong....
>
> - 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!
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk