> 
>     I see what you're doing -- I missed the part about using
>     the image area as the button. Disregard the 
> recommendation for FL_FLAT_BOX.
> 
>     I'm not sure if it's a good idea to make an invisible button
>     that overlaps the image, unless you make both the button's
>     up AND down box be invisible.
> 
>     I think the clean approach would be to forget using a button,
>     and make the image area a class derived from Fl_Box with its
>     own event handle()er that detects mouse clicks on the image
>     (FL_PUSH and FL_RELEASE) and invoke the callback.
> 
>     Should be easy to do.
>     I can post some code that would show how to do this if needed.


Yes - FL_NO_BOX just seems to confuse people. I have some code that does
what Greg suggests, that is I have a class derived from Fl_Box that
holds my image, and its handle method keeps track of the mouse position
(I change the cursor to a hand over the "active" areas) and mouse clicks
to "pretend" to be half a dozen buttons.

This works pretty well, but it was a lot more hassle than just throwing
something together in fluid! Also, I can't find the source right now, I
think it's on another box at home...
-- 
Ian





SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to