Hi, On Nov 5, 2012, at 12:33 PM, Greg Ercolano <e...@seriss.com> wrote:
> On 11/05/12 11:58, Laszlo Antal wrote: >> On Nov 5, 2012, at 9:06, Doug Parks <marickstemp...@yahoo.com> 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 ) Perfect thank you! Laszlo > _______________________________________________ > fltk mailing list > fltk@easysw.com > http://lists.easysw.com/mailman/listinfo/fltk _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk