07-Jun-04 Click here to download the Europa Anchor builder

Unzip the zip file to some place along your current Europa path. Then initialize it by running buildanchor() from the command window. This will establish a row in the foxcode table that will cause a ... button to be added to the property sheet whenever you select the Anchor property on the property sheet.

When you click the property sheet ... button, or execute buildanchor() from the command window, the BuildAnchor form will run. This form allows you to set each of the 10 control bits in the Anchor property using a more intuitive interface. The builder also allow you to easily "play" with these settings and see what effect they have on the textbox control in the center of the builder. As you resize the builder the textbox will use the current anchor value so you can see exactly how the textbox responds. The labels inside the container also explain how the .Top, .Left, .Height, .Width properties will be affected. The .Bottom and .Right are not real properties, but they are shown to help illustrate the anchor settings.

When you are happy with the anchor value, click the Apply button and the value will be applied to all of the currently selected controls in the form/class designer.

Since you will typically need to set the anchors for different controls to different values, this dialog is non-modal and will stay active until you close it. You can go back and forth between the designer and the builder setting anchors as you need.

The Read anchor on Activate checkbox will cause the builder to read the currently selected control(s) for the anchor value whenever you make the builder the active form. The first selected object with an anchor property will be the value captured by the builder. The builder will display a warning if all of the select controls do not have the same anchor value. This read allows you to explore controls in the designer and decode the anchor value as well as see how it behaves on the example textbox. If this checkbox is not checked the last anchor value will remain so that you can use the builder in a "painter" sort of mode.

The Reset button is used to return the example textbox to its initial state. Setting an anchor, resizing the builder, changing the anchor and resizing the builder can cause the textbox to reposition/resize over the top of other controls or somewhere completely outside the container boundaries. For example in this scenario:

Some general notes about how the anchor values work.

08-Jul-04 update to allow for spaces within the path to the builder, as well as conditionally enabling the Apply button.

1