Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Help needed regarding creating a subroutine to fit and view all items in a Tk::Canvas

by zentara (Archbishop)
on Nov 01, 2012 at 16:15 UTC ( #1001854=note: print w/replies, xml ) Need Help??


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.
# add these lines to force scroll to the ends my @bbox = $can->bbox( 'img' ); $can->configure(-scrollregion => [@bbox] ); $can->xviewMoveto(1); $can->yviewMoveto(1);
See example code in Tk photo pixel colors

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: Help needed regarding creating a subroutine to fit and view all items in a Tk::Canvas
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001854]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2016-10-01 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (6 votes). Check out past polls.