Re: solution to earlier Tk-composite-item problem

From: Erick Gallesio <>
Date: Tue, 05 Mar 1996 13:45:34 +0000

> Jonathan Berry writes
> ; To the stklos'ers out there: Thanks to Kevin Lewis
> ; ( (Kevin K. Lewis))
> ; for sending me a sample of his code. It proved to
> ; me that I could use Tk-composite-item for my task after
> ; all. I've included a modified version of his code below
> ; which does exactly what I had in mind (modulo the
> ; bind-for-dragging glitch). - Jon Berry
> ;********************************************************************
> [End of Code deleted]

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.

                -- Erick
Received on Tue Mar 05 1996 - 13:45:35 CET

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