peAnchors - DfBaseWindow

Describes how you want the control to react whenever its container changes size

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: None

Syntax
 Property Integer peAnchors

Read Access: Get peAnchors to IntegerVariable
Write Access: Set peAnchors to IntegerVariable/Value


Description

peAnchors describes how you want the control to react whenever its container (dbView, Group, etc.) changes size. It has been added to all controls (any visual objects), which ensures that the control retains the distance to the edges that it is anchored against, whenever the parent's size is changed.

Set peAnchors to one of the following constants:

ConstantMeaning
anNone The control should do nothing when the parent changes size.
anAll The control will maintain the same distance to the top, bottom, left and right edges of the parent. This will result in the control's height changing when the parent's does, and its width changing when its parent's does.
anBottomLeft The control will maintain the same distance to the bottom and left edges. This will result in the control moving when the parent is resized.
anBottomLeftRight The control will maintain the same distance to the bottom, left and right edges of the parent. This will result in the control getting wider when the width of the parent is changed and the control moving vertically when the parent's height is changed.
anBottomRight The control will maintain the same distance to the bottom and right edges of the parent. This will result in the control moving vertically and horizontally when the width and height of the parent is changed.
anTopBottomLeft The control will maintain the same distance to the top, bottom and left edges of the parent. This will result in the control changing its height when the parent is resized.
anTopBottomRight The control will maintain the same distance to the top, bottom and right edges of the parent. This will result in the control's height changing and the control moving horizontally when the height and width of the parent is changed.
anTopLeftRight The control will maintain the same distance to the top, left and right edges of the parent. This will result in the control getting wider when the width of the parent is changed.
anTopRight The control will maintain the same distance to the top and right edges of the parent. This will result in the control moving horizontally when the width of the parent is changed.


The following anchor constants are also valid, but are not exposed in the Studio, since they are equivalent to one of the exposed constants listed above:

ConstantMeaningStudio Equivalent
anBottom The control will maintain the same distance from the bottom edge of the parent. The control will move vertically when its parent's height is changed.anBottomLeft
anLeft The control will maintain the same distance from the left edge of the parent. The control will not move or resize itself.anNone
anLeftRight The control will maintain the same distance to the left and right edges of the parent. This will result in the control getting wider when the width of the parent is changed.anTopLeftRight
anRight The control will maintain the same distance to the right edge of the parent. This will result in the control moving horizontally when the width of the parent is changed.anTopRight
anTop The control will maintain the same distance from the top edge of the parent. The control will not move or resize itself.anNone
anTopBottom The control will maintain the same distance from the top and bottom edges of the parent. The control's height will change when its parent's height is changed.anTopBottomLeft
anTopLeft The control will maintain the same distance from the left and top edges of the parent. The control will not move or resize itself.anNone



Note: You will need to ensure that you set the Component's Border_Style property to Border_Thick; otherwise, you will not be able to resize the border, meaning that the Components can never get bigger, which, in turn, also means that none of the child control's anchors will ever be applied.


Think carefully about how you want to set the anchors. It is entirely possible to set anchors in such a way that they will not logically work together. For example, if you have two Forms on the same row and you set them both to anchor left-and-right, they will overlap each other, as the Component gets wider (the first Form's right edge will go beyond the left-unmoving-edge of the second Form.). The solution would be to make one anchor left-and-right, but the other to be anchored left (if it was the first control) or right (if it was the second control). Alternatively, if you really want them both to get wider, then put them on different rows.

Note:
peAnchors is not supported in the cSplitterContainer class.