in reply to Re: Attaching a balloon message to text on the canvas in thread Attaching a balloon message to text on the canvas
You beat me to it, zentara.
The method of attaching the balloon to the canvas, but then calling the -msg => \%messages structure does solve the problem. However, it seems not to work on a "Scrolled" canvas. For some reason, when using the Scrolled("Canvas", etc...) syntax, the message returns a "hash ref...." type message, and returns it on the whole canvas, not merely the portion you want.
So the likely solution is for you to do a regular canvas, add scrollbars the old manual way, and use the above hash format (which is available for easy browsing in the widget demo that perl tk comes with). I hope this helps you solve your problem. Do look at the widget demo for code ideas on this, as they have a good example of exactly this type of code (minus the scrolled version).
|