diff --git a/docs/xml/lcl/controls.xml b/docs/xml/lcl/controls.xml index 4dda5afdd9..b0300cb6a9 100644 --- a/docs/xml/lcl/controls.xml +++ b/docs/xml/lcl/controls.xml @@ -1077,8 +1077,8 @@ Uncomment when the topic exists in the RTL documentation. Set type used to store values from the TAnchorKind enumeration.

-TAnchors is the the type used to implement the Anchors property in TControl -and descendent classes. +TAnchors is the type used to implement the Anchors property in TControl and +descendent classes.

@@ -3944,8 +3944,8 @@ and DragImages. Asks the Control to provide a drag cursor.

-Called when a TDragPerformer repositions the the mouse pointer during an -active drag operation. +Called when a TDragPerformer repositions the mouse pointer during an active +drag operation.

@@ -5287,10 +5287,36 @@ TSizeConstraints. -Holds maximum and minimum values that can be used in sizing objects. +Holds minimum and maximum values for the width or height of a control. - - + +

+TSizeConstraints is a TPersistent descendant which +contains size constraints used to control the minimum or maximum width or +height for an associated control. TSizeConstraints is the type used to +implement the Constraints property in TControl and descendent classes. +

+

+The initial values for properties are retrieved from the widgetset class +instance for the Control when its handle has been allocated. Values in +TSizeConstraints properties are used when the Control is resized or its layout +is adjusted, and prevent the control from being resized to Width or Height +values that are in excess of the specified minimum or maximum values. If +properties are modified in TSizeConstraints, the associated control is updated +to apply the new size constraints (when needed). +

+
+ + + + + + + + + + +
@@ -5315,20 +5341,74 @@ Holds maximum and minimum values that can be used in sizing objects. -Signals an OnChange handler if assigned. - - + +Adjusts the size for the associated Control, and signals the OnChange handler +when assigned. + + +

+Change causes the AdjustSize method to be called in the associated Control. +It signals the OnChange event handler (when assigned) using the +TSizeConstraints instance as the Sender argument in the notification. +

+

+Change is called when a new value is assigned to the MaxWidth, MinWidth, +MaxHeight, or MinHeight properties. It is called when AssignTo is used to store +property values from the class instance to another persistent object. It is +also called when the AutoAdjustLayout is used to scale values in MaxWidth, +MinWidth, MaxHeight, or MinHeight properties by a specified size factor. +

+
+ + + + + + + + + + +
-Copies property values to the specified persistent object. - + +Copies property values to the specified persistent object. + + +

+AssignTo is an overridden method in TSizeConstraints used +to implement object persistence. It ensures that properties specific to +TSizeConstraints are stored to the persistent object in the Dest +parameter, and includes the MaxHeight, MaxWidth, MinHeight, and MinWidth +properties. The Change method is called to adjust the size for the associated +Control, and to signal the OnChange event handler when assigned. +

+

+No actions are performed in the method if the properties in the class instance +have the same values as their counterparts in the Dest argument. +

+

+If Dest is not derived from TSizeConstraints, the inherited AssignTo method is +called. +

+
+ + + + + + + TPersistent.Assign
-Persistent object where property values are stored. + +Persistent object where property values are stored. + @@ -5376,23 +5456,73 @@ Holds maximum and minimum values that can be used in sizing objects. -Constructor for the class instance. - - + +Constructor for the class instance. + + +

+Create is the constructor for the class instance, and calls the +inherited constructor on entry. Create sets the default values for properties +including: +

+
    +
  • MaxHeight (0)
  • +
  • MaxWidth (0)
  • +
  • MinHeight (0)
  • +
  • MinWidth (0)
  • +
+

+It also sets the value in the Control property to the associated control +specified in the AControl argument. +

+

+Create calls the UpdateInterfaceConstraints method to ensure that size +constraints from the Control are applied to the widgetset class instance when +Control is a TWinControl instance and its handle has been allocated. +

+
+ + + + + + + +
-TControl instance where the size constraints are applied. + +TControl instance where the size constraints are implemented. + -Asks the interface for size constraints. - - + +Applies size constraints from the specified Control to the widgetset class +instance. + + +

+No actions are performed in the method if Control is not derived from +TWinControl, or its handle has not been allocated. UpdateInterfaceConstraints +is called from the Create constructor after setting default property values, +and assigning the associated Control for the class instance. +

+
+ + + + + + + +
-Used by the LCL interface to set the widgetset constraints. +Used by the LCL interface to set the widgetset constraints in the class +instance.

@@ -5402,75 +5532,95 @@ Should only be used by custom components, not by applications. - + +Minimum width provided by the widgetset class instance. + - + +Minimum height provided by the widgetset class instance. + - + +Maximum width provided by the widgetset class instance. + - + +Maximum height provided by the widgetset class instance. + -Determines the minimum applicable width, given the local and interface +Determines the minimum applicable width given the local and interface constraints. - + + + + -Zero means no constraints. +Zero means no size constraint is defined. -Determines the minimum applicable height, given the local and interface +Determines the minimum applicable height given the local and interface constraints. - + + + + -Zero means no constraints. +Zero means no size constraint is defined. -Determines the maximum applicable width, given the local and interface +Determines the maximum applicable width given the local and interface constraints. - + + + + -Zero means no constraints. +Zero means no size constraint is defined. -Determines the maximum applicable height, given the local and interface +Determines the maximum applicable height given the local and interface constraints. - + + + + -Zero means no constraints. +Zero means no size constraint is defined. -Determines the constrained Width, and transfers it to the widget. +Determines the constrained Width and transfers it to the widget. -The constrained width. +The actual constrained width. The suggested width. @@ -5478,13 +5628,13 @@ Determines the constrained Width, and transfers it to the widget. -Determines the constrained Height, and transfers it to the widget. +Determines the constrained Height and transfers it to the widget. -The constrained height. +The actual constrained height. The suggested height. @@ -5495,8 +5645,33 @@ Determines the constrained Height, and transfers it to the widget. Adjusts width and height values in the class using the specified scaling factors. - - + +

+AutoAdjustLayout ensures that assigned (non-zero) values in +MinHeight, MaxHeight, MinWidth, and MaxWidth are scaled by the corresponding +scaling factor. If any of the property values are scaled, the Change method is +called to notify the associated Control that it should adjust it size. The +OnChange event is signalled (when assigned). +

+

+AutoAdjustLayout is called from the DoAutoAdjustLayout method in Control, and +occurs after values in BorderSpacing have been scaled. It occurs before the new +height and width for the Control are calculated and applied to its BaseBounds. +

+
+ + + + + + + + + + + + +
Scaling factor applied to width values. @@ -5530,45 +5705,218 @@ factors. -The Control to which these constraints apply. - - + +The associated Control to which these constraints apply. + + +

+Control contains the value passed as an argument to the Create +constructor. It represents the control which is notified and updated when +values in the MaxHeight, MaxWidth, MinHeight, or MinWidth properties are +changed. Control is used in the Change method to apply the new size +constraints. It also allows access to properties in both the control and its +widget instance - like the handle and component state. +

+
+ + + + + + + + + +
-Options used to determine the size constraints. - - + +Options used to determine the size constraints. + + +

+Options is a TSizeConstraintsOptions property which +contains zero (0) or more values from the TSizeConstraintsOption +enumeration. The default value for the property is an empty set ([]). +Values in Options are not used in the current LCL implementation. +

+
+ + + +
-Event handler for a change in the constraints. - - + +Event handler signalled when a value in the class instance has been changed. + + +

+OnChange is a TNotifyEvent property with the even handler +signalled when one of the values in MaxHeight, MaxWidth, MinHeight, or MinWidth +has been changed. OnChange is signalled (when assigned) from the Change method +using the current class instance as the Sender for the notification. OnChange +occurs after the modified constraints have been applied to the associated +Control and its size has been adjusted. +

+
+ + + + + + + + + + +
-The maximum height. - - + +The maximum height for the associated Control. + + +

+MaxHeight is a TConstraintSize property which contains +the maximum height in pixels allowed for the associated Control. The default +value for the property is 0 (zero) and indicates that the size constraint has +not been assigned and is not enforced. +

+

+Changing the value for the property causes assigned (non-zero) values in +MaxHeight and MinHeight to be normalized; the smaller of the two values becomes +the MinHeight, and the larger of the two values becomes the MaxHeight. The +Change method is called to apply the new size constraints to Control, and to +signal the OnChange event handler (when assigned). +

+

+Use MinHeight to set minimum height for the associated Control. +

+

+Use MaxWidth and MinWidth to set the constrained width for the associated +Control. +

+
+ + + + + + + +
-The maximum width. - - + +The maximum width for the associated Control. + + +

+MaxWidth is a TConstraintSize property which contains +the maximum width in pixels allowed for the associated Control. The default +value for the property is 0 (zero) and indicates that the size constraint has +not been assigned and is not enforced. +

+

+Changing the value for the property causes assigned (non-zero) values in +MaxWidth and MinWidth to be normalized; the smaller of the two values becomes +the MinWidth, and the larger of the two values becomes the MaxWidth. The +Change method is called to apply the new size constraints to Control, and to +signal the OnChange event handler (when assigned). +

+

+Use MinWidth to set minimum width for the associated Control. +

+

+Use MaxHeight and MinHeight to set the constrained height for the associated +Control. +

+
+ + + + + + + +
-The minimum height. - - + +The minimum height for the associated Control. + + +

+MinHeight is a TConstraintSize property which contains +the minimum height in pixels allowed for the associated Control. The default +value for the property is 0 (zero) and indicates that the size constraint has +not been assigned and is not enforced. +

+

+Changing the value for the property causes assigned (non-zero) values in +MaxHeight and MinHeight to be normalized; the smaller of the two values becomes +the MinHeight, and the larger of the two values becomes the MaxHeight. The +Change method is called to apply the new size constraints to Control, and to +signal the OnChange event handler (when assigned). +

+

+Use MaxHeight to set minimum height for the associated Control. +

+

+Use MaxWidth and MinWidth to set the constrained width for the associated +Control. +

+
+ + + + + + + +
-The minimum width. - - + +The minimum width for the associated Control. + + +

+MixWidth is a TConstraintSize property which contains +the minimum width in pixels allowed for the associated Control. The default +value for the property is 0 (zero) and indicates that the size constraint has +not been assigned and is not enforced. +

+

+Changing the value for the property causes assigned (non-zero) values in +MaxWidth and MinWidth to be normalized; the smaller of the two values becomes +the MinWidth, and the larger of the two values becomes the MaxWidth. The +Change method is called to apply the new size constraints to Control, and to +signal the OnChange event handler (when assigned). +

+

+Use MaxWidth to set maximum width for the associated Control. +

+

+Use MaxHeight and MinHeight to set the constrained height for the associated +Control. +

+
+ + + + + + + +
@@ -10422,7 +10770,7 @@ Contains the result for the Drag message. The Result member is polymorphic:

-For dmFindTarget, the result is a reference to the the target control. For +For dmFindTarget, the result is a reference to the target control. For dmDragDropm the result is zero (0). For other drag messages, the result indicates acceptance of the drop message.

@@ -11588,7 +11936,7 @@ in the LCL translation facilities.
-New value for the the Parent property. +New value for the Parent property. @@ -12086,7 +12434,7 @@ RemoveHandler can be used if the control handler type is passed as an argument.

-See EnabledChanged for the actions performed after the value in Enabled is +See EnabledChanged for the actions performed after the value in Enabled is updated.

@@ -16279,7 +16627,7 @@ conditions are satisfied.

-ShowHelp is called from methods in the the TApplication instance. It occurs +ShowHelp is called from methods in the TApplication instance. It occurs when the F1 key is pressed when the control has focus, or when its ShowHelpForObject method is called for a specific control instance.

@@ -23799,7 +24147,7 @@ event like: Ctrl, Shift, Alt, or Meta.

When a key is held down, the OnKeyDown event is re-triggered. The first -re-triggered event occurs after approximately 500ms, and subsequent events +re-triggered event occurs after approximately 500ms, and subsequent events cycle between 30ms and 50ms until the key is released.

@@ -23984,7 +24332,7 @@ instance. Setting the property to 0 (zero) causes the handle to be destroyed. 0 is the unassigned handle value.

-ParentWindow is used in the the CreateWnd method to form an association +ParentWindow is used in the CreateWnd method to form an association between the Handle in the widgetset class instance and the window handle for a control.