> If you are making your own widget, sub-classed from Fl_Widget (FWIW I
> would usually subclass from Fl_Box instead, btw!) you are probably
> better just using the sub-classed handle() method to cope with the
> mouse clicks on your widget. That is a much more direct way to handle
> the clicks than trying to mess about getting the callback to do what
> you want.
>
> I'd guess there's worked examples of this on Greg's cheat-sheet: this
> one
>   http://www.seriss.com/people/erco/fltk/#DraggableBoxes
>
> shows how to subclass from Fl_Box and write your own handle method.
> Simple enough to take that and extend it to detect your left/right
> mouse clicks instead.
>
> As to making the widget not participate in keyboard navigation (i.e.
> so you can't tab to it) then it should be enough to just do my_widget-
>  >clear_visible_focus();
> I quote the docs; "Disables keyboard focus navigation with this
> widget; normally, all widgets participate in keyboard focus navigation."
>
> --
>
> Ian
>
>

Thanks for that, managed to adapt it for FLTK2.

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

Reply via email to