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

Hi monks,

I am trying to build a standalone simple application in Perl using Win32::GUI. This time I need to use a TreeView module and things somehow slowly progress, despite seemingly limited documentation and lack of examples.

But I have a problem I can't figure out myself (long hours of research on the web did not help, leading to desperation..)

How can I do drag-and-drop of tree nodes from one to another? It seems there are provisions in the TreeView for that, but not a single line of code to demonstrate it.

TreeView window has an option:

-disabledragdrop 0/1


Setting it to "0" did nothing (neither if set to 1)

Then I tried using

$TV->CreateDragImage($node) with no success,


Manupulation with
GetDropHilight() SelectDropTarget($node)


Brought no result :((

Does anyone ever tried something like this or have an idea on how to make it work? Everything else works fine in my app, so it's very disappointing to have such a showstopper..

Any help would be greatly appreciated, need some wisdom!

Many thanks,

Replies are listed 'Best First'.
Re: Win32-GUI-TreeView drag-and-drop matter
by Anonymous Monk on Jul 25, 2007 at 05:43 UTC
      Many thanks for resources.

      However, it does not really help my problem - all drag and drop functionality described there is for the list view or file drag and drop onto the window. But none describes drag and drop within the tree view. Although obviously there was an attempt to have it there.