473,230 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

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 4388
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: simon_s_li | last post by:
Hi, I am having problems using drag drop and re-ordering items. Example: When I drag and item from position 1 and drag it to position 3, I want to re-order all the items accordingly. This...
2
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
4
by: zav | last post by:
Hi all i`m having a small problem with windows forms, i`m attempting to provide the following functionality to a form. Ability to drag and drop another form onto a form and then to dock this...
4
by: Qingdong Z. | last post by:
I have a VS.NET windows application which use drag-drop feather. It works fine when application start, but stops working after application run one or two days. The application is related to Video...
1
by: Kevin L | last post by:
I have a Panel control that I currently allow the user to drag and reposition on a form at runtime. This Panel control contains a Label control. I would like to allow the user to drag the PANEL...
0
by: Pesso | last post by:
I'm loading a text file to a RichTextBox control to drag a selection of a text and drop it into a tree view control. It works except after the drag and drop operation the RichTextBox scrolls to the...
1
by: timnels | last post by:
I have created a muti-select treeview control. Problem is I am now trying to implement drag/drop in the application that uses it. It seems the mouse down and mouse move events fire before the...
0
by: weird0 | last post by:
I have to build an application with drag-drop mechanism just as in Visual Studio 2005 where items from the toolbox can be dragged and drop. My application will contain images at the top, on the...
4
by: Jeff | last post by:
Hello, I am trying to drag and drop a label control from one cell in a tablelayoutpanel to another (VB2005). There is no problem if both cells are visible, but i cannot get the tablelayoutpanel...
2
by: bob | last post by:
Hi all, I have a treeview that has drag drop. Works well enough but... If you drag out of bounds of the treeview the nodrop icon comes on. Fair enough. But when I move back inside the treeview...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.