parentAspect

Type: Integer

Availability: Read or write at any time

The parentAspect property of the Control class contains the aspect of the control to its parent. The default value for this property is ParentAspect_None (0). For details about obtaining the bottom and right offsets of the control from its parent, see the Control class parentBottomOffset and parentRightOffset properties.

The parentAspect property provides the following features for any control other than a Sheet, StatusLine, JadeDockBar, or JadeDockContainer control, to enable you to define resize and reposition actions that take effect without having to write any logic.

When the value of the StatusLine control autoSize property is true:

The height of the StatusLine control is then determined by analyzing the child control as follows, to determine the maximum height required. For a child control that does not have a fixed height and has the parentAspect property with the:

The Control class constants are listed in the following table.

Constant Integer Value
ParentAspect_None 0
ParentAspect_StretchRight #1
ParentAspect_StretchBottom #2
ParentAspect_StretchBoth #3
ParentAspect_AnchorRight #4
ParentAspect_AnchorBottom #8
ParentAspect_AnchorBoth #c
ParentAspect_CenterHorz #10
ParentAspect_CenterVert #20
ParentAspect_CenterBoth #30

The property values are a bit mask of valid combinations. For example, you can anchor a control to the bottom of its parent and also have it stretch horizontally as the parent width varies, by setting the property value to ParentAspect_StretchRight + ParentAspect_AnchorBottom.

Similarly, you can center a control vertically and have it stretch horizontally as the parent width varies, by setting the property value to ParentAspect_CenterVert + ParentAspect_StretchRight. However, not all combinations are compatible, and an invalid combination results in an exception being raised at run time.

The following values for parentAspect are mutually incompatible and you can include only one.

The following values for parentAspect are mutually incompatible and you can include only one.

When using the parentAspect property, note the following points.

You can also use the Form class minimumHeight and minimumWidth properties to prevent the user resizing the form and causing controls to overlap or the form to have no effective height or width.