Re: always scroll to the bottom line of a SimpleList

On Thu, 2006-07-20 at 00:40 +0100, Dirk Koopman wrote:
How do I make sure that I am always scrolled to the bottom of a
Gtk2::SimpleList within a Gtk2::ScrolledWindow? 

# The command list
my $cmdlist = Gtk2::SimpleList->new(
                                      RxTime => 'tt',
                                      Information => 'tt',
my $cmdscroll = Gtk2::ScrolledWindow->new (undef, undef);
$cmdscroll->set_shadow_type ('etched-out');
$cmdscroll->set_policy ('never', 'automatic');
#$cmdscroll->set_size_request (700, 400);

When I add something, eg:

push @{$cmdlist->{data}}, [$ts,  $s];

How do I ensure that I am scrolled to the bottom (last input) line? I
know how to do this for a TextView but I can't make anything work for 
a SimpleList.

This is not getting just a bit aggravating...

I presume that $cmdlist->scroll_to_cell( .. ) does what is required but
which signal should I connect to? I have tried: row-activated,


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