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