Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by KuntalBhusan (Acolyte)
on Nov 29, 2012 at 14:57 UTC ( #1006265=note: print w/ replies, xml ) Need Help??


in reply to Re: How to control a Tk::AbstractCanvas with a second one
in thread How to control a Tk::AbstractCanvas with a second one

Thanks for the reply....but I actually wanted the reverse...I want to move the orange rectangle in the second canvas (which will have a scaled down view of the original) and the first canvas display should move appropriately...is it possible ?


Comment on Re^2: How to control a Tk::AbstractCanvas with a second one
Re^3: How to control a Tk::AbstractCanvas with a second one
by Anonymous Monk on Nov 29, 2012 at 15:01 UTC
      Ya...my 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 Canvas1...works 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2015-07-04 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls