From: ZB on
I would to ask: could be possible to add to canvas command an option, which
will allow to create "wrapped canvas" - when an object crossing the edge
enters the area from the opposite side? What do you think?
--
Zbigniew
From: Roger O on
You can get a callback when the mouse leaves the canvas. Then it is up
to that callback to figure out (a) which side of the canvas you left
and (b) where you want to go. Will exiting the bottom also take you to
the top? I would think not or you would be trapped in the canvas
forever!

Check out the Tk 'bind' command, with special attention to the <Leave>
tag. This is how you know the mouse has left the canvas.

IMO, moving the mouse in a program is generally not good interface
design. But that detail is yours. Can you even move the mouse in Tk?

--
Roger Oberholtzer
From: Uwe Klein on
Roger O wrote:
> You can get a callback when the mouse leaves the canvas. Then it is up
> to that callback to figure out (a) which side of the canvas you left
> and (b) where you want to go. Will exiting the bottom also take you to
> the top? I would think not or you would be trapped in the canvas
> forever!
>
> Check out the Tk 'bind' command, with special attention to the <Leave>
> tag. This is how you know the mouse has left the canvas.
>
> IMO, moving the mouse in a program is generally not good interface
> design. But that detail is yours. Can you even move the mouse in Tk?
>
> --
> Roger Oberholtzer

http://faqs.cs.uu.nl/na-dir/tcl-faq/tk/part1.html

search for XWarpPointer in page.

uwe
From: Andreas Leitgeb on
Uwe Klein <uwe_klein_habertwedt(a)t-online.de> wrote:
> Roger O wrote:
>> You can get a callback when the mouse leaves the canvas.
> http://faqs.cs.uu.nl/na-dir/tcl-faq/tk/part1.html
> search for XWarpPointer in page.

I don't think the OP used the word "object" to mean the mouse
pointer, but rather to mean canvas-objects (aka "items").

Consider on a 150x100 sized canvas a rectangle with
coords 60 60 190 140

As of now, you'd only see a corner (a w90 h40 rectangle) of
it, the rest being off-canvas. As I read the OP, with that
new option -wrap in place and set to 1, you'd now see the
rectangle item's previously off-screen portions wrapped
around, resulting in a pattern vaguely like e.g. the danish
flag, assuming a red rectangle on white background.

My personal opinion is: "not really worth that much trouble",
as I believe it would be very complicated to implement, but
anyway I hope to have correctly guessed and re-explained
the OP's intention.

From: ZB on
Dnia 07.07.2010 Andreas Leitgeb <avl(a)gamma.logic.tuwien.ac.at> napisa�/a:

> My personal opinion is: "not really worth that much trouble",
> as I believe it would be very complicated to implement, but
> anyway I hope to have correctly guessed and re-explained
> the OP's intention.

Yes, exactly; and I was wondering, would it be really that much trouble with
implementation?
--
Zbigniew