diff --git a/docs/xml/lcl/controls.xml b/docs/xml/lcl/controls.xml index b0300cb6a9..3b5f06c5b2 100644 --- a/docs/xml/lcl/controls.xml +++ b/docs/xml/lcl/controls.xml @@ -6044,9 +6044,9 @@ Used to differentiate default values in derived TControl classes. Describes the (minimum) spacing around a control.

-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.

@@ -6080,8 +6080,24 @@ CellAlignHorizontal, CellAlignVertical: TControlCellAlign; Used, for example, when the Parent ChildSizing.Layout defines a table layout.
+

+See and +for information about spacing around and between child controls on a control +instance. +

- + + + + + + + + + + + + @@ -6190,7 +6206,7 @@ Implements the storage specifier for the Around property. Returns True if border spacing value in Around has been assigned and contains a non-zero value, or when the value is different than the -default value passes to the constructor. +default value passed to the constructor. @@ -6484,6 +6500,7 @@ The space on a control side including Around space. Ordinal position for the value in the indexed property. + Automatically adjusts the size of the control using the specified proportions. @@ -6535,7 +6552,9 @@ value(s) in InnerBorder have been altered. -The control to which this border spacing applies. + +The control where the border spacing values are applied. + @@ -6547,19 +6566,35 @@ Provides indexed access to the border spacing value for a given anchor side.

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;
- + + + + + + + + -The side with border spacing accessed in the property. + +The side with border spacing accessed in the property. + -Spacing reserved on the left-hand side of the control. +Total border spacing reserved using the Around and Left properties.

@@ -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. +
-Space reserved on the top edge of the control. +Total border spacing reserved using the Around and Top 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. +

+
+ + + + +
-Space reserved on the right-hand side of the control. +Total border spacing reserved using the Around and Right 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. +

+
+ + + + +
-Space reserved on the bottom edge of the control. +Total border spacing reserved using the Around and Bottom 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. +

+
+ + + + +
-Space reserved on the left-hand edge of the control relative to the position -for the control. +Position for the left-hand edge of the associated Control after it has been +adjusted for border spacing.

-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).

+ +
-Space reserved on the top edge of the control relative to the position for -the control. +Position for the top edge of the associated Control after it has been +adjusted for border spacing. - - + +

+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). +

+
+ + + + + + +
-Total width for the control including spacing values in Around, Left, and -Right. +Total width for the control including border spacing values in Around, Left, +and Right.

@@ -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).

- + + + + + + + +
-Total height for the control including spacing values in Around, Top, and -Bottom. +Total height for the control including border spacing values in Around, Top, +and Bottom. - - + +

+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). +

+
+ + + + + + + +
-Space reserved on the right-hand edge of the control relative to the position -for the control. +Position for the right-hand edge of the associated Control after it has been +adjusted for border spacing. - - + +

+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). +

+
+ + + + + + + +
-Space reserved on the bottom edge of the control relative to the position for -the control. +Position for the bottom of the associated Control including assigned border +spacing. - - + +

+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). +

+
+ + + + + + + +
-Event handler for a change in border spacing. - - + +Event handler signalled when border spacing value(s) have been changed. + + +

+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. +

+
+ + + + +TNotifyEvent +
-The space at the left border. - - + +The border space on the left edge of the associated control. + + +

+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. +

+
+ + + + + + + + + + + + + +
-The space at the top border. - - + +The border space on the top 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. +

+
+ + + + + + + + + + + + + + +
-The space at the right border. - - + +The border space on the right 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. +

+
+ + + + + + + + + + + + + + +
-The space at the bottom border. - - + +The border space on the bottom 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. +

+
+ + + + + + + + + + + + + + +
-The space to add on each side of a control. - - + +The border space on each of the edges for 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. +

+
+ + + + + + + + + + + + + + + +
-Space added to the widget's preferred -size +Space added to the preferred +size for the widget.

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). +

- + + + + + +
-The horizontal alignment inside a table cell. - - + +The horizontal alignment of the associated Control when the control ChildSizing +uses a tabular layout. + + +

+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. +

+
+ + + + + + + +
-The vertical alignment inside a table cell. - - + +The vertical alignment of the associated Control when the control ChildSizing +uses a tabular layout. + + +

+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. +

+
+ + + + + + + +