Groups | Blog | Home
all groups > dotnet framework > november 2006 >

dotnet framework : Dragging and dropping onto a form with many controls


Gozirra
11/28/2006 2:12:58 PM
Couldn't you simply wire up the same eventhandler for all of your child
controls. This way you could use the same code to handle the drop.
You could loop through all of controls and wire up the events on the
fly. Just a suggestion although I will admit that this is not an area
I have a lot of experience with.

[quoted text, click to view]
Mark Ingram
11/28/2006 2:52:15 PM
Hi, I want to be able to drag and drop some files onto my application
but it is only possible to drop at a location where I have no child
controls.

e.g. If i have a form with a textbox on it, I want to be able to drop
the files anywhere, but currently I can't drop them on to the textbox
itself. Is there a quick way I can get around this (I *dont* want to add
in the drag / drop code for all the controls on my form - as i have far
too many).

Any help much appreciated,

Mark Ingram
11/29/2006 2:32:04 PM
[quoted text, click to view]

Yeah, that's what I've had to do, I was hoping for a smoother method
than that :-/

AddThis Social Bookmark Button