relativeLeft

Type: Boolean

Availability: Read or write at any time

The relativeLeft property of the Control class specifies whether the left position of a control is relative to the width of its parent.

If this property is set to true, the control position is adjusted proportionally when the parent is resized. For example, the left position of a list box can be set relative to the width of its form parent.

The settings of the relativeLeft property are listed in the following table.

Value Description
false If the parent is resized, no action occurs (the default)
true Reposition the control left in proportion to the size change undergone by the parent

Setting the relativeLeft property to true causes the adjustment of the left position for the control when the parent size changes. For example, if all of the relative properties are set to true, two adjacent list boxes resize, move, and are still adjacent after the resize of a form. Similarly, if you set the relativeTop and relativeLeft properties to true, a button remains the same size but it is positioned proportionally to the form size.

Some controls automatically resize themselves, and setting this property may have no effect. In addition, the relativeLeft property is ignored when a control is aligned. (See also the parentAspect property.)

If logic changes the position or size of the control, the distances to the edges of the parent of the control are re-evaluated and used from then on (that is, the relative ratios are re-evaluated).

The size ratios between the control and its parent are calculated when: