Question about Drag and Drop

Hi, All:
     for wxpython drag and drop, I found that most of the examples are
drag item within app frame, or drag files out side to app frame. I
wonder is there a way to drag files in app frame out to system folder?
     Thanks!

Hi,

yes of course! It's quite easy!
Look here: http://paste.pocoo.org/show/338124/

···

-----Ursprüngliche Nachricht-----
Von: wxpython-users@googlegroups.com
[mailto:wxpython-users@googlegroups.com] Im Auftrag von zhengqing
Gesendet: Montag, 14. Februar 2011 00:08
An: wxPython-users
Betreff: [wxPython-users] Question about Drag and Drop

Hi, All:
     for wxpython drag and drop, I found that most of the examples are
drag item within app frame, or drag files out side to app frame. I
wonder is there a way to drag files in app frame out to system folder?
     Thanks!

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

well, Thanks, but the example there is still drag file FROM windows
folder TO app, what I want is drag file FROM app TO windows folder. I
am not sure how to do that .
Thanks anyway!

···

On Feb 13, 11:16 pm, "Peter R" <pe...@gmx.net> wrote:

Hi,

yes of course! It's quite easy!
Look here:http://paste.pocoo.org/show/338124/

-----Ursprüngliche Nachricht-----
Von: wxpython-users@googlegroups.com
[mailto:wxpython-users@googlegroups.com] Im Auftrag von zhengqing
Gesendet: Montag, 14. Februar 2011 00:08
An: wxPython-users
Betreff: [wxPython-users] Question about Drag and Drop

Hi, All:
for wxpython drag and drop, I found that most of the examples are
drag item within app frame, or drag files out side to app frame. I
wonder is there a way to drag files in app frame out to system folder?
Thanks!

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visithttp://groups.google.com/group/wxPython-users?hl=en

Zhengqing wants to DRAG TO OUTSIDE OF THE FRAME.

···

On Feb 14, 2:16 am, "Peter R" <pe...@gmx.net> wrote:

Hi,

yes of course! It's quite easy!
Look here:http://paste.pocoo.org/show/338124/

All you have to do is to use a data type that the system recognizes for file drops and then implement the source side of the DnD like normal. The system (or any other target that recognizes the data type) will respond appropriately. wx.FileDataObject will be the correct native data type on each platform.

···

On 2/13/11 3:07 PM, zhengqing wrote:

Hi, All:
      for wxpython drag and drop, I found that most of the examples are
drag item within app frame, or drag files out side to app frame. I
wonder is there a way to drag files in app frame out to system folder?

--
Robin Dunn
Software Craftsman

Hi, Robin:
    Thank you very much for your solution.
    It works great!

···

On Feb 14, 9:56 am, Robin Dunn <ro...@alldunn.com> wrote:

On 2/13/11 3:07 PM, zhengqing wrote:

> Hi, All:
> for wxpython drag and drop, I found that most of the examples are
> drag item within app frame, or drag files out side to app frame. I
> wonder is there a way to drag files in app frame out to system folder?

All you have to do is to use a data type that the system recognizes for
file drops and then implement the source side of the DnD like normal.
The system (or any other target that recognizes the data type) will
respond appropriately. wx.FileDataObject will be the correct native
data type on each platform.

--
Robin Dunn
Software Craftsmanhttp://wxPython.org