> Well,
>
> In the end I rolled my own. Here's the code.
>
> Best,
> Marc
>

> void Fl_Image_Button::draw() {
>       if (value()==0)
>       {
>               if (upimage!=NULL) {
>                       this->image(upimage);
>               }
>       } else {
>               if (this->value()==1)
>               {
>                       if (downimage!=NULL) {
>                               this->image(downimage);
>                       }
>               }
>       }
>       Fl_Button::draw();
> }
>

I would recommend not setting image(), but instead copying the code for 
Fl_Button::draw() then drawing the appropriate image yourself (after drawing 
the box but before drawing the label).  This would circumvent the image() and 
align() settings for your class, and allow you to ensure that the image is 
always centered and clipped (assuming you want this).

Don.



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to