brockmd has asked for the wisdom of the Perl Monks concerning the following question:

I have an application where it would be nice to support drag and drop in both directions from windows explorer.
Thanks to the wisdom of the monks I have the tk recieve side of the remote drop working.
But I can find no examples that use Tk as the remote drag source. Can this be done? ( I am sure it can, but I do not know how)

Thanks
Dean

Replies are listed 'Best First'.
Re: drag and drop
by davidj (Priest) on Dec 03, 2004 at 03:05 UTC
    A colleague of mine at work had a similar need not too long ago. In our conversations about it, I recall him saying that he looked extensively into the matter and discovered that at the current time, Perl/TK only supports local dnd and remote dnd where the Tk app is is NOT the remote drag source. If he is correct, then you are out of luck.

    davidj
Re: drag and drop
by Anonymous Monk on Dec 03, 2004 at 10:00 UTC
    It appears that its not supported on windows.
Re: drag and drop
by Courage (Parson) on Dec 03, 2004 at 16:19 UTC
    As long as you're on windows, you can't use OS's drag-n-drop with perlTk, but you can try it from perl+Tcl/Tk, which very similar to perlTk in spirit.

    perl+Tcl/Tk allows windows-native widgets, see http://vkonovalov.ru/samp-activex.jpg
    Can't comment on how stable it is, because I did not happen to actively use ActiveX from perl.

    Best regards,
    Courage, the Cowardly Dog

Re: drag and drop
by Anonymous Monk on Dec 04, 2004 at 04:19 UTC
    On Win there exist 3 (yes THREE) mechanisms (as of 1998) for drag and drop. Each one applys in slightly other circumstances. So which one do you want to support?
Re: drag and drop
by Anonymous Monk on Dec 05, 2004 at 10:56 UTC
    http://www.perl.com/pub/a/2001/12/11/perltk.html contains a good introduction and also says: "There are two basic types of DND operations, local (intra-application) and remote (inter-application). Local drops are fully supported, but there is no standard for remote drops. For this reason, this article describes only local DND operations. Note: Perl/Tk supports Sun, XDND, KDE, and Win32 remote DND protocols." So its sounds as though there is a way. If anyone finds a solution and publishes it as an exmaple it would be a greate help.