Re: Drag and drop issue with 'Data' argument
Peter Osucha <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Nevermind. This makes much more sense now that I've reviewed it in a reference I have (that I couldn't review last evening because it was at the office). Peter -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Peter Osucha Sent: Monday, April 30, 2007 2:55 AM To: [email protected] Subject: [DOTNET-WINFORMS] Drag and drop issue with 'Data' argument 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