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
Have you read <URL: http://
groups.google.com/groups?as_q=drag+drop+tkinter&as_ugroup=comp.lang.python >?
--
Cameron Laird <Cam...@Lairds.com>
Business: http://www.Phaseit.net
Personal: http://phaseit.net/claird/home.html
>In article <ApGdnUgAC6p...@comcast.com>,
>Marc <losna...@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.
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
There is a nice example here using an as well nice Tree widget:
http://www.esrf.fr/computing/bliss/guides/python/modules/Tree/Tree.html
Kindly
Michael
<URL: http://wiki.tcl.tk/tkdnd > might interest you.
I think they will be answered when you look at the link (Tree.py) I posted
yesterday ;-)
Kindly
Michael P