473,406 Members | 2,769 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,406 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 4399
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.