We help IT Professionals succeed at work.

DRAG CONTROL SMOOTHLY AT DESIGN TIME

emi_sastra
emi_sastra asked
on
Hi All,

I create a form and I want to drag a control that space between control could be moved smoothly and as close as possible between controls.

How could I do it ?

Thank you.
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
Are you saying you would like to turn off the "snap-to" functionality--at least briefly?

Author

Commented:
Hi kaufmed,

I want to do it at design time :

ControlA

ControlB

I want it to be :
ControlA
ControlB

It is hard to use drag controlB to close to controlA at design time. I have to use location property to set it.

Is there any other to set it ?

Thank you.
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009
Commented:
With the control selected, simply use the arrow keys to move it around.
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015
Commented:
You can hold down the "Alt" key while dragging and it should negate the snap-to functionality until you release the key.

Author

Commented:
Hi Idle_Mind,

Yes, it works.
I wonder any other way to set the drag smoothly ?

Thank you.

Author

Commented:
Hi kaufmed,

Yes, it works also.

Thank you.

Author

Commented:
Hi All,

Thank you very much for your help.
CERTIFIED EXPERT
Top Expert 2015

Commented:
Select both controls.

In the toolbar, you have a series of buttons that help you to work with controls placement. If it does not show, activate View...Toolbars...Layout.

There is a button toward the middle to Remove Horizontal Spacing, and another one, a little more to the right to Remove Vertical Spacing.

Author

Commented:
Hi JamesBurger,

Great. You should be regarded a point.

Thank you very much for your help.

Author

Commented:
Hi JamesBurger,

Please see my new question regarding this post.
I will provide you points for your answer.

Thank you.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.