Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Raise canvas item to top

by Phinix (Acolyte)
on Nov 17, 2012 at 19:07 UTC ( #1004340=note: print w/replies, xml ) Need Help??

in reply to Raise canvas item to top

I am creating right and left mouse click bindings to the node items on the main canvas. I need them to be images that blend into the main canvas background. I tried just creating each image on the main canvas, setting it to a localized variable in the process, then binding to that variable, however bind complains saying it needs an instance of a package or some such to set up bindings.

There may be another way to set up bindings on a canvas item using it's internal stack ID that I am not aware of, this is just the only way I know to make it work. Bind never complained about being set to createWindow objects on a canvas, while others do. Again, they are all items created on the same main canvas, so it theoretically shouldn't matter what they are, they should all be bind-able and follow the stacking rules.

Perhaps it works that way in newer versions of Perl/Tk. I am currently using 5.12.

For right now I am just putting the main info window for all the nodes in one fixed location (a corner) that doesn't overlap anything, so that is working for now. It would be nice however to be able to place the popup info windows adjacent to the actual item without it being covered.

Thanks for the feedback. Especially Mr. Zentara. You contribute so much around here, I just thought you deserved a special thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004340]
and a moth chases the moon...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2018-06-24 13:42 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.