It would be nice to be able to use "drag and drop" to
move selected text. Ctrl+Drag'n'Drop should copy the
selected text. SciTE version 1.61 has this feature.
This looks like it might be a bit of a pain.
It seems each wx.Window can have only one drop target, and
currently that is being used to handle files dragged and
dropped onto the main stc.
I am going to look into making my own drop target class, but
that could be a bit, so this is not on the table straight away.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, I can vouch for it being a pain. I think that a
wxDataObjectComposite, a wxCustomDataObject and a customized
wxPyDropTarget can be used together to recognize different
types of drop data.
Unfortunately, I think that this is the type of feature that
is used so much (at least by me) that the editor is quite
unfriendly without it. The good news is that this is the
only really serious issue that I found in the last barrage
of testing that I did.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am thinking this will not work. I do not want to get rid
of file drag and drop, and wxDataObjectComposite is a mess I
don't want to play in. One option would be to let people
choose whether they want file or text drag and drop.
However this could be messy, if the user does not restart
drpython.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Having an option is certainly better than nothing, even if
the application has to be restarted. Personally, I hardly
ever use DnD to open a file in an app, but in editors I
always use DnD to move or copy text.
On the other hand, it's probably better to do it right
rather than spend your time on a work-around. You could just
leave the issue open until you or somebody else has the time
and inclination to handle the issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=796750
This looks like it might be a bit of a pain.
It seems each wx.Window can have only one drop target, and
currently that is being used to handle files dragged and
dropped onto the main stc.
I am going to look into making my own drop target class, but
that could be a bit, so this is not on the table straight away.
Logged In: YES
user_id=558529
Yeah, I can vouch for it being a pain. I think that a
wxDataObjectComposite, a wxCustomDataObject and a customized
wxPyDropTarget can be used together to recognize different
types of drop data.
Unfortunately, I think that this is the type of feature that
is used so much (at least by me) that the editor is quite
unfriendly without it. The good news is that this is the
only really serious issue that I found in the last barrage
of testing that I did.
Logged In: YES
user_id=796750
I am thinking this will not work. I do not want to get rid
of file drag and drop, and wxDataObjectComposite is a mess I
don't want to play in. One option would be to let people
choose whether they want file or text drag and drop.
However this could be messy, if the user does not restart
drpython.
Logged In: YES
user_id=558529
You could take a look at how it's done in SciTE.
Having an option is certainly better than nothing, even if
the application has to be restarted. Personally, I hardly
ever use DnD to open a file in an app, but in editors I
always use DnD to move or copy text.
On the other hand, it's probably better to do it right
rather than spend your time on a work-around. You could just
leave the issue open until you or somebody else has the time
and inclination to handle the issue.
Logged In: YES
user_id=796750
:) Finally! Thanks to some helpful code from Robin Dunn, I
can add this in as an option:
I am thinking File Drag and Drop, File and Text Drag and Drop,
and also, letting the user choose whether or not this should
be a copy and paste or cut and paste operation.
This will be in 3.7.0.
Cheers,
Dan