in reply to Setting the yview position in scrolled

You've almost answered your question yourself. Tk::Frame is non-interactive. The first sentence of Tk::Pane - DESCRIPTION:

"Tk::Pane provides a scrollable frame widget."

Change

... Scrolled('Frame', ...

to

... Scrolled('Pane', ...

and you'll probably have more luck. :-)

-- Ken

Replies are listed 'Best First'.
Re^2: Setting the yview position in scrolled
by Anonymous Monk on Jul 18, 2013 at 08:08 UTC
    Sorry - no go, I also tried with Pane and I get: Tk::Error: Can't call method "Call" on an undefined value at /usr/local/perl5.8.6/lib/site_perl/5.8.6/i686-linux/Tk/Pane.pm line 346, <DATA> line 6.
      #!/usr/bin/perl -- use strict; use warnings; use Tk; my $mw = tkinit; my $target = 45; my $tmax = 60; my $bb = $mw->Button( -text => 'JT' )->pack;; my $tt = $mw->Entry( -textvariable => \$target )->pack; my $br = $mw->Button( -text => 'RJ' )->pack;; my $fr = $mw->Scrolled('Frame')->pack; $fr->Button( -text => $_ )->pack for 0 .. $tmax; $bb->configure( -command => [ \&dothat, $fr, \$target, $tmax ] ); $br->configure( -command => [ \&dothat, $fr, \$target, $tmax , 'random +'] ); MainLoop; sub dothat { my( $fr, $tgr, $tm , $random ) = @_; $random and $$tgr = int rand $tm; my $tg = $$tgr / $tm; $fr->yview( moveto => $tg ); return; } __END__
        Thanks - this works
      show your code