Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^4: How to control a Tk::AbstractCanvas with a second one

by KuntalBhusan (Acolyte)
on Nov 30, 2012 at 05:05 UTC ( #1006404=note: print w/replies, xml ) Need Help??

in reply to Re^3: How to control a Tk::AbstractCanvas with a second one
in thread How to control a Tk::AbstractCanvas with a second one concern was in moving the rectangle (rather dragging it to pan the main canvas view). I am now able to do it almost the way I wanted but in a different way...using the rubber band zoom function the Canvas2 and applying the effect in like a charm :)
## $can is the canvas displaying the main graph and $can_1 is the cont +roller canvas... $can_1->configure(-bandColor => 'orange'); $can_1->CanvasBind('<Button-1>' => sub {$can_1->Canvas +Focus; $can_1->rubberBand(0)}); $can_1->CanvasBind('<B1-Motion>' => sub {$can_1->rubberBand(1) +}); $can_1->CanvasBind('<ButtonRelease-1>' => sub { my @box = $can_1->rubberBand(2); $can->viewArea(@box) });
Thanks for all the help I got....Happy coding

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006404]
[Corion]: I found Android Studio quite nice as a Java IDE, but then, I didn't try anything serious with it
[chacham]: it is a nice ide. its just that upgrading it always causes issues with mismatched versions of whatever
[Corion]: chacham: Oh, yes, reinstalling all the SDK versions and Gradle and whatnot, yes, even in the short time I used it (2 weeks?) I felt that pain
[chacham]: right now im editing the versions in the applications gradle file to use a version it wants. sheesh.
[Corion]: Ow, "but you're not supposed to do that" ;)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2017-03-29 08:02 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (344 votes). Check out past polls.