Home All Groups Group Topic Archive Search About

Re: Drag and Drop with custom controls

Author
21 Nov 2004 5:33 AM
AlBruAn
Thanks!  That's it!

Show quote
"Sijin Joseph" wrote:

> The DoDragDrop method accepts an object for data so you can use any pass
> in any kind of data, it's upto the client to recognize the data.
>
> So you could make a simple class like
>
> public class ImageAndText
> {
>     public string text;
>     public Image image;
> }
>
> and then pass this as the data to DoDragDrop
>
> Let me know if you face problems with this.
>
> Sijin Joseph
> http://www.indiangeek.net
> http://weblogs.asp.net/sjoseph
>
> AlBruAn wrote:
> > I have what is probably a stupid question, but I have an array of controls
> > based on a custom control I want to allow users to drag and drop from one
> > form (similar to a toolbox) onto the primary form.  The custom control has a
> > bitmap and contains text that varies among the array of custom controls on
> > the first form.  I realize the DoDragDrop function permits passing of text or
> > image data, but is there any way to pass both pieces of information to the
> > primary form?
>

AddThis Social Bookmark Button