Board index » delphi » TreeView and Drag'n'Drop

TreeView and Drag'n'Drop

Hello,

there's a little question for all windows experts.
I would like to have a TreeView components which is capable of ading or
moving with Drag'n'Drop, Just like Windows Explorer does. So, when I hold
the Ctlr button there needs to be this little + displayed with the dragged
item.

How do I do that?

Thanks for your help,

  Heinz

 

Re:TreeView and Drag'n'Drop


You need to make an icon that represents the Tiled image and use the
DrawiconEx to mask it to the screen when the mouse is in motion.
Quote
Heinz Waldherr wrote:
> Hello,

> there's a little question for all windows experts.
> I would like to have a TreeView components which is capable of ading or
> moving with Drag'n'Drop, Just like Windows Explorer does. So, when I hold
> the Ctlr button there needs to be this little + displayed with the dragged
> item.

> How do I do that?

> Thanks for your help,

>   Heinz

Re:TreeView and Drag'n'Drop


In response to your component's DragOver event, you can control the cursor you
want to use, like so:

if status_is_such_and_such then screen.cursor := crdrag
else screen.cursor := my_custom_cursor;

- Jeff -
- Jeff Napier -
Check out http://members.aol.com/javawizard

Other Threads