TextDropTarget and FileDropTarget both

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TextDropTarget and FileDropTarget both

King
Hi,

In a window I have added a simple TextDropTarget class, which is working fine. Later I have also added in same panel a FileDropTarget, now only FileDropTarget is working.
Both are added in this way:

self.SetDropTarget(utils.CanvasTextDropTarget(self))
self.SetDropTarget(utils.CanvasFileDropTarget(self))

May be second call is overriding first one. How do I solve?

Cheers

Prashant

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: TextDropTarget and FileDropTarget both

Rufus V. Smith
You need to create a multiple type drop target.  I ran into the same issue when I was
playing with drop targets.
 
You need to base a class on wx.PyDropTarget
and set the data object as a wx.DataObjectComposite() containing the different
data types droppable.
 
----- Original Message -----
Sent: Friday, March 23, 2012 6:38 AM
Subject: [wxPython-users] TextDropTarget and FileDropTarget both

Hi,

In a window I have added a simple TextDropTarget class, which is working fine. Later I have also added in same panel a FileDropTarget, now only FileDropTarget is working.
Both are added in this way:

self.SetDropTarget(utils.CanvasTextDropTarget(self))
self.SetDropTarget(utils.CanvasFileDropTarget(self))

May be second call is overriding first one. How do I solve?

Cheers

Prashant

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en