Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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?
[thezip]: Our cat is single-handedly (pawed-ly?) solving our field mouse problem. About four critters in the last week alone.
[thezip]: Amazing speed and stealth in that one.
[GotToBTru]: You can't tunafish, but some seafood companies can tunafish. More fun with English.
[virtualsue]: a veterinarian told me to cut down on my cat's food. i said, when i do that she just catches more mice
[thezip]: My dogs are also excellent mousers, at least that's what they tell me.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2017-11-17 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?