Welcome! Log In Create A New Profile

Advanced

Drag & Drop TreeView to Edit control

Posted by Javier.pcs.crosspost 
Javier.pcs.crosspost
Drag & Drop TreeView to Edit control
March 09, 2009 05:18PM
Hello
I'm trying to drag items from a treeview using drag & drop to an edit control by program, I declared dndSource control, the dndTarget and events dndDragOver and dndDrop but when I drop over target don't add anything to Edit control.
In automatic mode it works but I want to monitor only certain elements can be draged, that the reason I use programmed mode. The code is the next:
/ / Initialize the TreeView
TreeView..dndSource = dndProgram
/ / Initialize the edit field
EDT_1.. DndTarget = dndProgram
DnDEvent ( "Rollover," "EDT_1" dndDragOver)
DnDEvent (OnDrop, EDT_1 "dndDrop)
/ / Rollover Procecimiento
PROCEDURE Rollover ()
IF TreeTypeItem (TreeView, TreeView [TreeView]) = tvLeaf THEN
DnDCursor (dndCopy)
ELSE
DnDCursor (dndNone)
END
/ / Procedure OnDrop
PROCEDURE OnDrop ()
DnDAccept (dndCopy)

//////////
Drag from TreeView but not drop on Edti control.
Can anyone help me?
Thanks

Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: