468,247 Members | 1,454 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Drag and drop in Tkinter. How difficult is it?

Hi all,

I was thinking about developing a drag and drop application and was curious
how difficult it is to do. Basically I want to have a set of objects that I
move around the screen and drop into place.

Anyone else ever done it? Got any tips?

Thanks,
Marc
Jul 18 '05 #1
8 4073
In article <Ap********************@comcast.com>,
Marc <lo********@comcast.net> wrote:
Hi all,

I was thinking about developing a drag and drop application and was curious
how difficult it is to do. Basically I want to have a set of objects that I
move around the screen and drop into place.

Jul 18 '05 #2
On Thu, 04 Sep 2003 09:14:08 -0000, rumours say that cl****@lairds.com
(Cameron Laird) might have written:
In article <Ap********************@comcast.com>,
Marc <lo********@comcast.net> wrote:
[Marc]
I was thinking about developing a drag and drop application and was curious
how difficult it is to do. Basically I want to have a set of objects that I
move around the screen and drop into place.


- Cameron -LOTS of applications--several I've written, I
know--do this sort of thing. You'll need to
learn about bind(), and most likely the events
<1>
<B1-Motion>
<ButtonRelease-1>
in particular: you'll teach <1> to start a
drag, <B1-Motion> to display the dragged object
moving around the screen, and <ButtonRelease-1>
to finish the drop.

Have you read <URL: http://
groups.google.com/groups?as_q=drag+drop+tkinter&as_ugroup=comp.lang. python >?


I should add that drag and drop in the same application can be done
easily, but it's hard to do it between your application and others (too
much window manager dependencies...)
--
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
Jul 18 '05 #3
In article <qe********************************@4ax.com>,
Christos "TZOTZIOY" Georgiou <tz**@sil-tec.gr> wrote:
Jul 18 '05 #4
Excellent. Thanks for the head start.

A couple of questions.

1) If I want to have a moving object, and not just a cursor that
represents the moving object, do I need to continually pack and unpack
the widget that holds the object and redraw it to give it the
appearance of moving? I know sometimes the redrawing can cause
applications to flicker too much, destroying the effect. I don't know
if there's an optimum way to do this.

2) Also, in reading I found an old module called Tkdnd (drag and
drop). It was an experimental module that was supposed to be updated
but never was. Now I can't find any more information on it. Does this
module still exist or work?

Thanks,
Marc
Jul 18 '05 #5

"Marc" <lo********@comcast.net> schrieb im Newsbeitrag
news:Ap********************@comcast.com...
Hi all,

I was thinking about developing a drag and drop application and was curious how difficult it is to do. Basically I want to have a set of objects that I move around the screen and drop into place.

Anyone else ever done it? Got any tips?


There is a nice example here using an as well nice Tree widget:
http://www.esrf.fr/computing/bliss/g...Tree/Tree.html

Kindly
Michael
Jul 18 '05 #6
In article <43**************************@posting.google.com >,
Marc <mn******@airmail.net> wrote:
Jul 18 '05 #7
In article <43**************************@posting.google.com >,
Marc <mn******@airmail.net> wrote:
Jul 18 '05 #8

"Marc" <mn******@airmail.net> schrieb im Newsbeitrag
news:43**************************@posting.google.c om...
Excellent. Thanks for the head start.

A couple of questions.


I think they will be answered when you look at the link (Tree.py) I posted
yesterday ;-)

Kindly
Michael P
Jul 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by simon_s_li | last post: by
2 posts views Thread by SamSpade | last post: by
4 posts views Thread by Qingdong Z. | last post: by
1 post views Thread by Kevin L | last post: by
2 posts views Thread by bob | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.