|Think about Loose Coupling|
Raise canvas item to topby Phinix (Acolyte)
|on Nov 17, 2012 at 09:00 UTC||Need Help??|
Phinix has asked for the
wisdom of the Perl Monks concerning the following question:
Recently I have been working on an interactive tree structure, where the user can click on bound canvas items at various "nodes" on the tree to perform different tasks.
I am using the createWindow method to set up the node buttons with background images and bindings to click. Each node image also has a label below it (also an item on the same canvas) which is bound to an enter/leave that pops up a tooltip window which I also create using the createWindow method.
The problem is even though this popup window should be on top since it is created last, parts of it are still tucked under the node images.
I have tried giving my popup windows a tag and using $canvas->raise('tag'), however this does not work either.
I don't know if the reason is due to the node images being createWindow canvases themselves but that doesn't seem like it should matter. To me, since they are all children put on the main canvas using create methods they should all be in the same stack regardless of type.
My question is how can I reliably keep my popup windows on top? I can provide code samples if needed but to be honest the code for this project has got to be pretty complex at this point.