Menu

#8 Drag and Drop Selection

closed
nobody
5
2004-11-25
2004-10-29
No

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.

Discussion

  • Daniel Pozmanter

    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.

     
  • Matthew Thornley

    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.

     
  • Daniel Pozmanter

    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.

     
  • Matthew Thornley

    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.

     
  • Daniel Pozmanter

    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

     
  • Daniel Pozmanter

    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.