in reply to Help needed regarding creating a subroutine to fit and view all items in a Tk::Canvas
Try something like in this example code. After getting your bbox('all'), do your configure, then adjust the scrollbars.
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
See example code in Tk photo pixel colors# add these lines to force scroll to the ends my @bbox = $can->bbox( 'img' ); $can->configure(-scrollregion => [@bbox] ); $can->xviewMoveto(1); $can->yviewMoveto(1);
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
|
---|
In Section
Seekers of Perl Wisdom