-TControlBorderSpacing defines the spacing around a control. The spacing -around its children and between its children is defined in . +TControlBorderSpacing defines the number of pixels reserved as +spacing on the various borders for a control. TControlBorderSpacing is the type +used to implement the BorderSpacing property in TControl.
+See and +for information about spacing around and between child controls on a control +instance. +
Space is an indexed Integer property which provides -access to the border spacing used for a specified TAnchorKind value. For example: +access to the border spacing used for a specified TAnchorKind value. +
++For example:
AControl.BorderSpacing.Space[akTop] := 6;
++Which is equivalent to: +
+AControl.BorderSpacing.Top := 6;
@@ -6567,9 +6602,7 @@ Spacing reserved on the left-hand side of the control. indicates the spacing used around and on the left-hand side of the control.
-AroundLeft represents the total space reserved on all sides of the control, -plus any additional space reserved on it left-hand edge. The value for the -property is calculated as the sum of the values from the Around +AroundLeft is calculated as the sum of the values in the Around and Left properties. Updates must be performed to the Around and Left properties.
@@ -6577,73 +6610,140 @@ Left properties.+AroundTop is a read-only Integer property which +indicates the spacing used around and on the top side of the control. +
++AroundTop is calculated as the sum of the values in the Around +and Top properties. Updates must be performed to the Around and +Top properties. +
++AroundRight is a read-only Integer property which +indicates the spacing used around and on the right-hand edge of the control. +
++AroundRight is calculated as the sum of the values in the Around +and Right properties. Updates must be performed to the Around and +Right properties. +
++AroundBottom is a read-only Integer property which +indicates the spacing used around and on the bottom side of the control. +
++AroundBottom is calculated as the sum of the values in the Around +and Bottom properties. Updates must be performed to the Around and +Bottom properties. +
+-ControlLeft is a read-only Integer property that -indicates the space reserved on the left-hand edge of the control relative to -the position for the control class instance. The value in -ControlLeft is calculated as the difference between the -Left position for the control and the values in the -Around and Left properties. For example: +ControlLeft is a read-only Integer property. Its value is +calculated as the difference between the Left property in the +Control and the values in the Around and Left +properties for the class instance.
-FControl.Left-Around-Left
++For example: +
+Control.Left - Around - Left
If a TControl instance is not available in Control, the value for the property is 0 (zero).
+ControlTop is a read-only Integer property. Its value is +calculated as the difference between the Top property in the +Control and the values in the Around and Top +properties. +
++For example: +
+Control.Top - Around - Top
++If a TControl instance is not available in Control, the +value for the property is 0 (zero). +
+@@ -6652,110 +6752,470 @@ contains the total width for the control including spacing values in the Around, Left, and Right properties. The property value is calculated using the following formula:
-TControl.Width + (2 * Around) + Left + Right
+Control.Width + (2 * Around) + Left + Right
If a TControl instance is not available in Control, the value for the property is 0 (zero).
+ControlHeight is a read-only Integer property with the +total height for the associated Control including border spacing +values. The property value is calculated using the following formula: +
+Control.Height + (2 * Around) + Top + Bottom
++If a TControl instance is not available in Control, the +value for the property is 0 (zero). +
++ControlRight is a read-only Integer property. Its value +is calculated as the sum of the Left property in the +Control, its Width, and the values in the +Around and Right properties for the class instance. +
++For example: +
+Control.Left + Control.Width + Around + Right
++If a TControl instance is not available in Control, the +value for the property is 0 (zero). +
++ControlBottom is a read-only Integer property. Its value +is calculated as the sum of the Top property in the +Control and its Height with the values in the +Around and Bottom properties. +
++For example: +
+Control.Top + Control.Height + Around + Bottom
++If a TControl instance is not available in Control, the +value for the property is 0 (zero). +
++OnChange is a TNotifyEvent property with the event +handler signalled when one of the properties in the class instance has been +changed. OnChange is signalled (when assigned) from the Change method. It +occurs after the border spacing values have been applied to the associated +Control, and its size has been adjusted. +
++Left is a TSpacingSize property which indicates the +number of pixels used as border spacing for the associated Control. +It specifies the minimum distance between either the left edge of the parent +control or the right edge of an adjacent sibling control. +
++Changing the value for the property causes the Change method to be +called to notify and apply modifications to the associated Control, and to +signal the OnChange event handler (when assigned). +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder may be scaled by X +and Y scaling factors when the AutoAdjustLayout method is called. +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder are used in Control +methods which anchor or adjust the layout and size for the control instance on +its parent control. +
++Use Right to specify the border spacing on the right-hand edge of the +associated Control. +
++Top is a TSpacingSize property which indicates the number +of pixels used as border spacing for the associated Control. It +specifies the minimum distance between either the top edge of the parent +control or the bottom edge of an adjacent sibling control. +
++Changing the value for the property causes the Change method to be +called to notify and apply modifications to the associated Control, and to +signal the OnChange event handler (when assigned). +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder may be scaled by X +and Y scaling factors when the AutoAdjustLayout method is called. +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder are used in Control +methods which anchor or adjust the layout and size for the control instance on +its parent control. +
++Use Bottom to specify the border spacing on the bottom edge of the +associated Control. +
++Right is a TSpacingSize property which indicates the +number of pixels used as border spacing for the associated Control. +It specifies the minimum distance between either the right edge of the parent +control or the left edge of an adjacent sibling control. +
++Changing the value for the property causes the Change method to be +called to notify and apply modifications to the associated Control, and to +signal the OnChange event handler (when assigned). +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder may be scaled by X +and Y scaling factors when the AutoAdjustLayout method is called. +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder are used in Control +methods which anchor or adjust the layout and size for the control instance on +its parent control. +
++Use Left to specify the border spacing on the left-hand edge of the associated +Control. +
++Bottom is a TSpacingSize property which indicates the +number of pixels used as border spacing for the associated Control. +It specifies the minimum distance between either the bottom edge of the parent +control or the top edge of an adjacent sibling control. +
++Changing the value for the property causes the Change method to be +called to notify and apply modifications to the associated Control, and to +signal the OnChange event handler (when assigned). +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder may be scaled by X +and Y scaling factors when the AutoAdjustLayout method is called. +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder are used in Control +methods which anchor or adjust the layout and size for the control instance on +its parent control. +
++Use Bottom to specify the border spacing on the bottom edge of the +associated Control. +
++Around is a is a TSpacingSize property which indicates +the number of pixels used as border spacing for the associated +Control. It specifies the minimum distance between an edge on the +parent control or an adjacent edge on a sibling control. +
++Changing the value for the property causes the Change method to be +called to notify and apply modifications to the associated Control, and to +signal the OnChange event handler (when assigned). +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder may be scaled by X +and Y scaling factors when the AutoAdjustLayout method is called. +
++Values in Left, Right, Top, Bottom, Around, and InnerBorder are used in Control +methods which anchor or adjust the layout and size for the control instance on +its parent control. Around is applied independent of values in the Left, Right, +Top, or Bottom properties; the effective border spacing is always a sum of the +value in Around and the corresponding property for a given edge. +
+When calculating the preferred -size of control, the LCL asks the widget first. +size of the associated Control, the LCL checks the widget first.
-When the widget returns a preferred size, e.g. a TButton widget, then the -InnerBorder is added twice to this size - e.g. to the Height for top and -bottom space. +If the widget has a preferred size, such as a TButton widget, then the +InnerBorder value is added to increase the Height or Width of the control at +both of the opposing borders; Top and Bottom for preferred height, Left and +Right for preferred width.
If the widget does not return a preferred size, the InnerBorder has no effect.
++Changing the value for the property causes the Change method to be called to +recalculate the preferred size for the associated Control, and to signal the +OnChange event handler (when assigned). +
+CellAlignHorizontal is a TControlCellAlign property which +controls the horizontal alignment and sizing of the control when its Parent +uses a tabular layout for child controls. The default value for the property is +caFill and causes the control to be resized to horizontally fill the +cell where the control is displayed. +
++See TControlCellAlign for more information +about the values in the enumeration and their meanings. +
++Changing the value for the property causes the Change method to be called to +recalculate the preferred size for the associated Control, and to signal the +OnChange event handler (when assigned). +
++The value in CellAlignHorizontal is used when the AlignControls method in the +associated Control is called. +
++CellAlignVertical is a TControlCellAlign property which +controls the vertical alignment and sizing of the control when its Parent +uses a tabular layout for child controls. The default value for the property is +caFill and causes the control to be resized to vertically fill the +cell where the control is displayed. +
++See TControlCellAlign for more information +about the values in the enumeration and their meanings. +
++Changing the value for the property causes the Change method to be called to +recalculate the preferred size for the associated Control, and to signal the +OnChange event handler (when assigned). +
++The value in CellAlignVertical is used when the AlignControls method in the +associated Control is called. +
+