> Many thanks for your suggestion. But the default callback of 
> the button widget will be called after the release event. So 
> the push event will not call the callback. How to change to 
> make the push and release event can both call the callback 
> function? Thanks.

Did you even try the demo I posted? If so, you will have found that it
does work, and the main button triggers the callback on both the press
and on the release, as you require.

The key is setting the "when" option for the button to "FL_WHEN_CHANGED"
like this:

        bt_1->when(FL_WHEN_CHANGED);

I'm not sure what the exact syntax for fltk-2 is, but it is basically
similar.


SELEX Galileo Ltd
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