From 709f86d99f4b93f7a407074c6c75dc68502eafcf Mon Sep 17 00:00:00 2001 From: dsiders Date: Tue, 30 Nov 2021 02:08:39 +0000 Subject: [PATCH] Docs: LCL/forms. Updates topic content for TCustomFrame and TFrame. (cherry picked from commit aaee8f28813010a2db17b75e127c1431dde6d56f) --- docs/xml/lcl/forms.xml | 136 ++++++++++++++++++++++++++++++++++------- 1 file changed, 114 insertions(+), 22 deletions(-) diff --git a/docs/xml/lcl/forms.xml b/docs/xml/lcl/forms.xml index 09190e90e2..24a1bf642d 100644 --- a/docs/xml/lcl/forms.xml +++ b/docs/xml/lcl/forms.xml @@ -1741,9 +1741,14 @@ No actions are performed in the method when a Parent form has not been assigned for the class instance. +

+ AddActionList is called from the Notification method when a TCustomActionList instance has been added to the control. This occurs when a new Parent is assigned for the frame instance. +

+ + TControl.Parent @@ -1756,9 +1761,14 @@ No actions are performed in the method when a Parent form has not been assigned for the class instance. +

+ RemoveActionList is called from the Notification method when the TCustomActionList instance has been added to the control. This occurs when a new Parent which contains an action list is assigned for the frame instance. +

+ + TControl.Parent
@@ -1819,11 +1829,11 @@ - Also handles add/remove of ActionLists. + Adds or removes an action list for the control. - TComponent.Notification - TControl.Notification + TControl.Notification + TComponent.Notification @@ -1855,7 +1865,9 @@ Sets the value for the Parent property. - Also updates the ActionLists, and performs automatic layout adjustments when needed. +

+ Updates the action list for child components or nested frames by calling AddActionList or RemoveActionList. Frees the Handle for the control when Parent has not already been assigned. Calls the inherited method to update the value in Parent. Performs automatic layout adjustments when the PixelsPerInch settings for the Parent and the frame instance have different value. +

TControl.Parent @@ -1863,25 +1875,37 @@
- Value assigned to the Parent property. + New value for the Parent property. Sets the value for the ParentBackground property. - + +

+ Ensures that Color is changed to the value in the Parent control when the property is set to True. Color is set to clDefault when the property is set to False. Calls UpdateOpaque to ensure that the csOpaque style flag is applied to the ControlStyle property as needed. +

+
- New value for the property. + New value for the ParentBackground property. Handles the CM_PARENTCOLORCHANGED message for the control. - + +

+ CMParentColorChanged is an overridden method in TCustomFrame. It calls the inherited method on entry to update the values in Color and ParentColor. If the control has finished loading using the LCL component streaming mechanism, the UpdateOpaque method is called to update flag values in the ControlStyle property. ControlStyle is not updated if csLoading is included in the ComponentState property. +

+
+ TControl.CMParentColorChanged + TControl.ParentColor + TControl.Color +
@@ -1905,10 +1929,29 @@ TFiler instance where property definitions are added. - - - - + + Gets the preferred height and width for the control used during auto-sizing. + +

+ CalculatePreferredSize is an overridden method in TCustomFrame. It ensures that the inherited method is not called when the frame is an un-parented component and visible on the form designer. This allows the dimensions to be freely resized on the design surface. Values in the PreferredWidth, PreferredHeight, and WithThemeSpace arguments are not modified at design-time. +

+

+ If the frame has an Owner (parent form) at run-time, the inherited method is called to get the values used in the LCL auto-sizing algorithms. +

+
+ + TWinControl.CalculatePreferredSize + +
+ + Preferred width for the control. + + + Preferred height for the control. + + + True if additional space is reserved in the width or height for theme details. + Updates control style flags to reflect the transparency for the frame. @@ -1956,9 +1999,19 @@ Owner of the class instance. - + + Gets the default dimensions for a new instance of the class. + +

+ GetControlClassDefaultSize is an overridden method in TCustomFrame, and does not call the inherited method. The return value is a TSize instance with the width and height for the new class instance in its X and Y members. The default dimensions in TCustomFrame are 320 pixels wide (X member) by 240 pixels tall (Y member). +

+
+ + + +
- + TSize type with the width and height for the new class instance. @@ -1982,7 +2035,13 @@ - + + Class type used to create new instances of TCustomFrame. + + + + + @@ -2009,13 +2068,25 @@ - - + + + + Constructor for the class instance. + +

+ Create is the overridden constructor for the class instance. It sets the value for the LCLVersion property to the lcl_version constant defined in the lclversion.pas unit. Create calls the inherited constructor prior to exiting from the method. +

+
+ + + + +
- Owner of the class instance. + @@ -2034,7 +2105,22 @@ - + + + LCL version number for the frame instance. + +

+ The value in LCLVersion is assigned in the Create constructor using the lcl_version constant defined in the lclversion.pas unit. Its value is stored during LCL component streaming if a value has not been assigned to the Parent for the control. +

+
+ + + + + + +
+ @@ -2199,9 +2285,15 @@ - The set of form state flags. - - + Set type used to store values from the TFormState enumeration. + +

+ TFormState is the type used to implement the FormState property in TCustomForm and descendent classes. +

+
+ + +