1

I have a (rather small) Panel full of labels and a few other controls. I've made this panel draggable, but because of the size and content there are only a few "holes" which actually activate the drag&drop (e.g. corners).

Is there a way to display all the labels on "the background" of the panel so that I can click anywhere on the Panel to trigger the dragevent?

I hope my question is clear enough.

Hetiwos
  • 229
  • 1
  • 4
  • 13

1 Answers1

1

i think this link might help you... you would want to allow the children to drag and drop the parent control instead of moving your controls to the background of the panel

Community
  • 1
  • 1
Yugz
  • 677
  • 1
  • 10
  • 23
  • That is indeed exactly what I was looking for! Thanks a bunch Yugz! – Hetiwos Jun 11 '13 at 11:45
  • You can possible automate it by subscribing to [ControlAdded](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.controladded.aspx) event (and ControlRemoved) and subsribing on all child events required for drag-n-drop. Then you can forward them to the parent control (with EventArg substitution), so when you touch a Label, your Panel feels "touched". =D – Sinatr Jun 11 '13 at 11:54