Movable controls

decrypt

Junior Contributor
Joined
Oct 6, 2003
Messages
216
I'm trying to make control that contains panels of buttons that can be moved around inside the control. How could I make the panels movable by the user?
 
Override the mouse down event, set a flag (ex. mouseDown = true)
Override the mouse up event, set the flag to false

Override the mousemove event, check for the mouseDown flag and change the location of the panel relative to the mouse movement.

You might want to change the cursor when it is over a moveable panel or give the panel a border if it is not distinct on the form.
 
Back
Top