wxDROP ICON

Hi all,

does anybody know, if wxDROP_ICON is implemented in wxPython (for Windows)?
I would like to change the Cursor in wxFileDropTarget.
The wxWindows manual tells me to use the Macro "wxDROP_ICON" , which is a "GDI" Function.
But I could not find this one in wxPython.
"SetCursor" did not work.
Does anybody have an idea, how changing the Cursor in "wxFileDropTarget" works?

regards,

Henni

···

--
brainbot technologies AG boppstrasse . 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:henni@brainbot.com

I don't know if it's what you are looking for, but I put a drag-and-drop
example on the wxPython wiki in the ListAndTreeControls section that
manipulates the cursor in the wxDropSource's GiveFeedback() method. Rather
than showing the Drop_Icon cursor, I let the drag-and-drop interface handle
the cursor unless I explicitly blocked it with the No_Entry cursor. I could
not find a reference to the Drop cursors either, so followed this different
route.

See section 1.7 at http://wiki.wxpython.org/index.cgi/ListAndTreeControls

Maybe you could adapt this approach to meet your needs.

David Woods
Wisconsin Center for Education Research
University of Wisconsin, Madison

···

-----Original Message-----
From: Thorsten Henninger [mailto:henni@brainbot.com]
Sent: Wednesday, September 17, 2003 9:51 AM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] wxDROP ICON

Hi all,

does anybody know, if wxDROP_ICON is implemented in wxPython (for Windows)?
I would like to change the Cursor in wxFileDropTarget.
The wxWindows manual tells me to use the Macro "wxDROP_ICON" , which is
a "GDI" Function.
But I could not find this one in wxPython.
"SetCursor" did not work.
Does anybody have an idea, how changing the Cursor in "wxFileDropTarget"
works?

regards,

Henni

--
brainbot technologies AG
boppstrasse . 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:henni@brainbot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Thorsten Henninger wrote:

Hi all,

does anybody know, if wxDROP_ICON is implemented in wxPython (for Windows)?

No it isn't.

I would like to change the Cursor in wxFileDropTarget.
The wxWindows manual tells me to use the Macro "wxDROP_ICON" , which is a "GDI" Function.
But I could not find this one in wxPython.
"SetCursor" did not work.
Does anybody have an idea, how changing the Cursor in "wxFileDropTarget" works?

You have to do it from the wxDropSource when you start the drag operation. Just give the wxDropSource a set of wxCursors (or wxIcons on platforms other than wxMSW) when you construct it.

You can also do whatever you want in an overridden GiveFeedback method.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Thorsten Henninger wrote:

Hi,

I have a problem catching the event.Dragging().
I catch the "EVT_MOTION" and then I would like to set a custom wxDropSource, if the user drags files into the application.
I can "EVT_MOTION" , but never "event.Dragging()", even if I drag something.

EVT_MOTION and event.Dragging are for low level mouse events that happen in your app (IOW, you are moving the mouse across your window while holding down the button.)

DnD is a higher level protocol between windows which is initiated and mostly handled by the source side of the operation.

Is there another possibility to setup a custom wxDropSource for a Panel?
As far as I understand this, I have to catch the Dragging-Event somehow, like "EVT_TREE_BEGIN_DRAG" for a wxTreeCtrl, but there isn't any comparable Event for File-DragAndDrop.

You need to create a wxDropTarget for your panel and set it with SetDropTarget. For getting files then you will want to derive a class from wxFileDropTarget and override its OnDropFiles method. See the demo for more examples.

···

regards,

Thorsten

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!