Re: Dragging object in Canvas.stk
> I'm working with STk 2.2. I have a question on procedure
> "stk::motion-drag" in "lib/STk/Canvas.stk." In "stk::motion-drag"
> code, user :motion hook is applied after revising stk::last-{x,y}.
> However, this is very inconvenient for me. Because I would like to
> move a current object together with objects attached to it. With the
> current code, the user has no way to access the last-{x,y} position,
> therefore can't calculate the moving distance. Now I'm using with a
> modification in which I just apply the user hook before setting new
> stk::last-{x,y}. Is there any crucial problem with this modification?
>
> -take
>
I complained about a similar problem when it happened going from 2.1.6
to 2.1.7. By making a tk-composite-widget out of your object and those
"attached" to it, you should be about to do this, but no one ever
responded to my mail. stk::motion=drag should be moving the canvas
group not the selected item. I think that it sounds like a bad choice
on your part to be using stk::lastx and stk::lasty as those varaibles
weren't meant to be used, but you should be able to selected and drag
a canvas group. I will be posting a message to this list later today
announcing some software which handles this problem with a modification
to Canvas.stk.
-josh
Received on Thu Sep 07 1995 - 19:20:52 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST