467,116 Members | 1,198 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,116 developers. It's quick & easy.

Drag Drop question

I have a Panel control that I currently allow the user to drag and
reposition on a form at runtime.
This Panel control contains a Label control.

I would like to allow the user to drag the PANEL by clicking on the LABEL
and dragging.

Is there a way to do this?
Nov 20 '05 #1
  • viewed: 1379
Share:
1 Reply
I found a way to accomplish what I wanted.
If anyone is interested:

1 - I modified the Handles statement on my Panel's Mousedown event to handle
the Mousedown Event of my label
2 - When the MouseDown event is fired, I first check to see if the Sender is
a label control, if yes, I change the value of SENDER to the label's Parent
control which is the Panel.

The rest of the Drag Drop code in the event handles the drag drop as it had
before. This allows the user to click on the label and drag the panel.

"Kevin L" <no_spam@not_real_email.com> wrote in message
news:OY***************@tk2msftngp13.phx.gbl...
I have a Panel control that I currently allow the user to drag and
reposition on a form at runtime.
This Panel control contains a Label control.

I would like to allow the user to drag the PANEL by clicking on the LABEL
and dragging.

Is there a way to do this?

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by SamSpade | last post: by
3 posts views Thread by Ajay Krishnan Thampi | last post: by
6 posts views Thread by jojobar | last post: by
1 post views Thread by Manuel Canas | last post: by
5 posts views Thread by sesar | last post: by
8 posts views Thread by benkial@hotmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.