RE: Auto-scrolling the scrollbar on a TreeView




j g karssenberg student utwente nl wrote:
The behavior you want should happen automatically - works for me. Certain
widgets, like the TreeView and the TextView understand if they are nested
within a scrolled window and scroll automatically when needed. Probably there
is something wrong with the way you set up the scrolled window and the
treeview together.

The link you give does not work, so I can not check your code.

Take the semicolon off the end.  ;-)

  http://pages.cs.wisc.edu/~hoelz/TodoList.pl

And, indeed, Jaap's intuition is correct:

    $topScroll->add_with_viewport($top);
    $bottomScroll->add_with_viewport($bottom);

$top and $bottom are both "natively scrollable" widgets, so
add_with_viewport() actually messes them up.   Just do

    $topScroll->add($top);
    $bottomScroll->add($bottom);

-- 
muppet <scott at asofyet dot org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]