Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#8 Drag and Drop Selection

Matthew Thornley

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.


  • Logged In: YES

    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

    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

    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

  • Logged In: YES

    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

    :) 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.


    • status: open --> closed