Re: solution to earlier Tk-composite-item problem

From: Kevin K. Lewis <>
Date: Mon, 11 Mar 96 10:00:16 CST

> Resent-Date: Tue, 05 Mar 1996 13:45:34 +0000
> Cc:
> Reply-To:
> Date: Tue, 05 Mar 1996 13:45:34 +0000
> From: Erick Gallesio <>
> I'm afraid that I have not understood the problem...
> Since a long time Josh MacDonald (aprticlularry, but others too :)
> said me that there was a problem with STk bind-for-dragging. I have
> understood that it was relative to dragging composite
> widgets. However, it is my sentiment that the current code allow to
> do this with the :only-current option set to #f. In this case, the
> drag will be done on all the composite objects rather than on the
> selected objet.
> Using the definition Ohnathan gives in his previous post
> (define c (make <canvas>))
> (pack c)
> (define v (make <vertex> :parent c :coords '(100 100) :text "1"))
> it seems to me that
> (bind-for-dragging c :tag (Cid v) :only-current #f)
> should do the work.
> I must admit that it is not very elegant, and it would be probably
> useful to write a method for dragging composite widgets which hides,
> that all the components of a composite widget share the same Cid.
> Josh, I have looked at the code you have in the file Envdraw and it
> seems to me that it only does that. Or have I missed something?
> Please tell me, so I can modify it for the next release.

The problem I am having does not relate to this (I don't think). I've
always had `:only-current' set to `#f'.

My problem is that if I call `bind-for-dragging' several times, only
the last application works. All others are overridden. I don't know
that this is a problem with STk (I've been told that it is). I was
just wondering if one may use many independent `bind-for-dragging'

To clarify further, all my composite widgets are dragable (ie, they
all respond to my mouse dragging them), but the `:motion' procedure
that is called for each composite widget is that associated with the
last `bind-for-dragging' binding.

Maybe I'm confusing the above with a separate issue. If so, I'm sorry
for wasting everyone's time.

Kevin K. Lewis               | My opinions may be unreasonable       | but such is the voice of inspiration
Received on Mon Mar 11 1996 - 17:02:47 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST