#!/usr/bin/perl -w use strict; use Tk; my $main = MainWindow->new; my $list = $main->Scrolled('Listbox', -scrollbars => 'e', -selectmode => 'single')->pack; foreach my $i (1..100) { $list->insert('end', "item $i"); } my $button = $main->Button(-text => "Scroll to Bottom of List", -command => \&scroll_to_bottom)->pack; MainLoop; sub scroll_to_bottom { my ($first, $last) = $list->Subwidget("yscrollbar")->get; # set to end of list my $winsize = $last - $first; $first = 1.0 - $winsize; $last = 1.0; $list->Subwidget("yscrollbar")->set($first, $last); }