|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dragging and dropping onto a form with many controlsHi, 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, Thanks 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. Mark Ingram wrote: Show quote > 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, > > Thanks Gozirra wrote:
> Couldn't you simply wire up the same eventhandler for all of your child Yeah, that's what I've had to do, I was hoping for a smoother method > 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. > than that :-/ Cheers, |
|||||||||||||||||||||||