VLFormDesigner Reference

MethodAlignSelectedControls

See Also See Also   Applies To Applies To

Aligns selected controls as specified by the method parameters.

 

Syntax

object.AlignSelectedControls(ByVal eAlignType As vlAlignTypes)

 

The AlignSelectedControls method syntax has these parts:

Part Description
object An object expression that evaluates to VLFormDesigner.
eAlign An integer specifying the alignment to be applied on the selected controls, as described in Settings.

 

Settings

The settings for eAlign are:

Constant Setting Description
ConstantvlAlignLeft 0 The left edge of all selected controls will be aligned with the left edge of the last selected control
ConstantvlAlignTop 1 The top edge of all selected controls will be aligned with the top edge of the last selected control.
ConstantvlAlignRight 2 The right edge of all selected controls will be aligned with the right edge of the last selected control
ConstantvlAlignBottom 3 The bottom edge of all selected controls will be aligned with the bottom edge of the last selected control
ConstantvlAlignGrid 4 The selected controls are resized and moved to align with the nearest grid dots.

 

Remark

This method allows you to provide control aligning functionality with as little as a single line of code.

AlignSelectedControls will not change position of a control that is currently marked as locked .