Drag and drop issue with 'Data' argument
Peter Osucha <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <001b01c78af4$8171a330$0202a8c0@peterhome> |
Beginning a dragdrop operation is easy enough - call the DoDragDrop method. I can't figure out what should best be put in the 'Data' argument for the DoDragDrop method though. Suppose I had a tree that showed a file/folder structure and I wanted a drop target to be a textbox. I could use the folder or file text as the 'Data' object in the DoDragDrop method (or I could create another object based on the file or folder selected for the 'Data' argument). However, what should the textbox be looking for in its dragenter/dragover events? If I had another tree that showed some other information that also could be used as a dragdrop source, how could I restrict the textbox from being a target for the second tree while still allowing a drop from the first tree? It doesn't seem that I could just use text in the 'Data' argument unless I did something (which seems like a hack) like prefacing the string with the source tree name... Peter