KuntalBhusan has asked for the wisdom of the Perl Monks concerning the following question:
But it does not seen to work properly and do what I need.... Any help will be highly appreciated in this regard.. Thanks, Kuntalsub fit_to_canvas { my ($xt0,$yt0,$xt1,$yt1) = $_canvas{0}->bbox('all'); if($xt0 != "") { my ($x0,$y0,$x1,$y1) = $_canvas{0}->bbox('all'); $_canvas{0}->xviewMoveto($x0); $_canvas{0}->yviewMoveto($y1); $_canvas{0}->configure(-scrollregion => [$x0,$y0,$x1,$y1]); }## end of if not empty canvas }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help needed regarding creating a subroutine to fit and view all items in a Tk::Canvas
by zentara (Cardinal) on Nov 01, 2012 at 16:15 UTC |