On 02.01.2013 13:14, Albrecht Schlosser wrote: > So the approach to subclass Fl_Scroll should work as suggested. > It could maybe need just a little code in handle(), something > like this might suffice: > > MyScroll::handle(int event) { > > Fl_Widget *fw = Fl::focus(); // save focus widget > int ret = Fl_Scroll::handle(event); > if (ret && fw != Fl::focus) { // event used and focus changed
should read: if (ret && fw != Fl::focus()) { ... > // check focus widget and scroll ... > // your design decision here how to manage scrolling > // returns wx and wx to scroll to should read: // returns wx and wy to scroll to > scroll_to(wx,wy); > > } > return ret; // return Fl_Scroll/Fl_Group's return value > } And note that this is untested code. Albrecht _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk