Home > Language Reference > Design Time Properties

Anchors Property

Defines the way controls are moved or resized when their containing form is resized.

Remarks

The Anchors property applies to controls, and define the way their are moved or resized to accomodate changes in form size. Note that this property has no effect if the form on which the control resides cannot be resized, that is if its DIA property is set to any other value than 'Enabled (resize)'.

The Anchors property allows you to tie each control border to either the same form border, or either to the opposite form border. When the form is resized, the control bounds are updated so that the distance between each control border and the form border it is tied to is preserved. For both horizontal and vertical direction, you can choose one of the following behaviors:

ValueDescription
FixedThe left and right (resp. top and bottom) borders are tied to the left (resp. top) border of the form. This implies that the control is neither moved nor resized when the form dimensions change.
MoveThe left and right (resp. top and bottom) borders are tied to the right (resp. bottom) border of the form. This implies that the control is moved when the form dimensions change so that the distance between the control and the border of the form is preserved.
ResizeThe left (resp. top) border is tied to the left (resp. top) border of the form, while the right (resp. bottom) border is tied to the right (resp. bottom) border of the form. This implies that the control is resized when the form dimensions change, so that the distance between the control borders and the form borders are preserved.

When defining anchors, you should keep in mind that a form can be resized both horizontally and vertically, due to the portrait and landscape mode available on some devices.

Please refer to the Dynamic Input Area article in the Programmer's Guide for an overview of the dynamic input area feature.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 5.0Only effective on devices with one-handed navigation enabled.