On 11/05/12 11:58, Laszlo Antal wrote:
> On Nov 5, 2012, at 9:06, Doug Parks <[email protected]> wrote:
>>> Is it possible to compare the color of a widget in an "if" statement?  If 
>>> so how would I go about doing it.  I have tried using a standard comparison 
>>> but it says it is unable to do it.
>>
>> I figured it out.  Sorry for the inconvenience.
> 
> And your solution is?

        You can get the color of a widget with Fl_Widget::color()
        and compare it like an integer.

        If it's a color-map color, you could use:

        if ( w->color() == FL_RED )

        ..or if it's an RGB value, you could use:

        if ( w->color() == 0xffaa8800 )
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to