Thanks; missed that..
I'll take a look and try to merge it in; autoscroll is
definitely on the list of things to do both for keyboard nav
and mouse drags.
Domingo Alvarez Duarte wrote:
> It seems that for some reason you didn't saw or like my sugestion that
> allows automatic scroll of the the tree when navigating with keyboard:
>
> case FL_Up: // next item up
> case FL_Down: { // next item down
> set_item_focus(next_visible_item(_item_focus, ekey)); // next
> item up|dn
> if ( _item_focus ) { // item
> in focus?
> if ( _prefs.selectmode() == FL_TREE_SELECT_MULTI && //
> multiselect on?
> (Fl::event_state() & FL_SHIFT) && //
> shift key?
> ! _item_focus->is_selected() ) { // not
> already selected?
> select(_item_focus); //
> extend selection..
> }
> //code bellow allow automatic scrolling with keyboard
> switch (ekey) {
> case FL_Up:
> if(_item_focus->y() < y())
> vscroll->value(vscroll->value()-_item_focus->h());
> break;
> case FL_Down:
> if((_item_focus->y()+_item_focus->h()) > (y()+h()))
> vscroll->value(vscroll->value()+_item_focus->h());
> break;
> }
> //code end automatic scrolling
> return(1);
> }
> break;
> }
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk