diff --git a/docs/xml/lcl/controls.xml b/docs/xml/lcl/controls.xml index 4cf7590203..0a11dde8ae 100644 --- a/docs/xml/lcl/controls.xml +++ b/docs/xml/lcl/controls.xml @@ -4003,7 +4003,7 @@ - Alias to an Integer type. + Alias to the Integer type.

TSpacingSize is an alias to the Integer type. TSpacingSize is used for values that represent spacing around or between controls. TSpacingSize is the type used to implement properties in TControlBorderSpacingDefault and TControlBorderSpacing. @@ -4643,11 +4643,11 @@ Another example:

- +-------+ -+---+ | | -| A | | B | -+---+ | | - +-------+ ++-------+ +| | +---+ +| B | | A | +| | +---+ ++-------+

Centering A relative to B: @@ -10590,12 +10590,34 @@ - The Action associated with this control. + The Action associated with the control. - The Action property is a shortcut to ActionLink.Action. +

+ Action is a TBasicAction property with the action assigned to the control. The value for the property is read from the Action property in ActionLink (when assigned). If ActionLink has not been assigned, the property value is Nil. +

+

+ Assigning an action to the property causes ActionLink to be updated. If the new property value is Nil, the TControlActionLink instance in ActionLink is freed and control style flags are updated to remove the value csActionClient. +

+

+ Conversely, a TControlActionLink instance is created for a non-empty action assignment. Its OnChange event handler is set to the private DoActionChange method in the class instance. Control style flags are updated to include the value csActionClient. +

+

+ Action is used in the Click method to signal its OnExecute event handler when assigned and enabled. Preference is given to the OnClick in the control (when assigned). +

+

+ Values in the Caption, Enabled, HelpType, and Hint properties can be linked to the Action through the property values in the ActionLink. +

+

+ Use AssignTo to copy property values in the control to a TCustomAction instance. +

+ + + + + TBasicAction
@@ -11032,12 +11054,19 @@ How the control is currently docked. (horizontally, vertically, in a notebook, or not at all). - - + +

+ The property value is assigned when the control is inserted into a docking tree during a drag and dock operation. Its value is used when CalculateDockSizes is called to adjust the height or width for the host dock site. +

+
+ + + + - Tries to find out whether the control is floating (not part of a form). + Determines whether the control is floating (not part of a form). @@ -11053,7 +11082,9 @@ - The host site (TWinControl) into which this control is docked. Nil if not docked. + + The host site (TWinControl) into which this control is docked. Nil if not docked. + @@ -11337,7 +11368,7 @@ How child controls are sized relative to their parent.

- TControlChildSizing is a TPersistent descendant which provides properties and methods used to layout, align, and resize child controls relative to their parent. Properties are provide which define the horizontal and vertical spacing between controls, the preferred direction controls are aligned, and whether controls are scaled to fit in the parent control. + TControlChildSizing is a TPersistent descendant which provides properties and methods used to layout, align, and resize child controls relative to their parent. Properties are provide which define the horizontal and vertical spacing between controls, the preferred direction controls are aligned, and whether controls are scaled to fit in the parent control.

See and for details about the enumeration values used in the properties. @@ -16133,10 +16164,10 @@ if MyControl.CanSetFocus then Example1: Docking "A" (source window) left to "B" (target window)

-+---+ +----+ -| A | -> | B | -+---+ | | - +----+ ++---+ +-----+ +| A | -> | B | +| | | | ++---+ +-----+

Result: A new docktree will be created. Height of "A" will be resized to the height of "B". A splitter will be inserted between "A" and "B". And all three are children of the newly created TLazDockForm of the newly created TDockTree. @@ -16173,11 +16204,11 @@ if MyControl.CanSetFocus then Example2: Docking A into B

- +-----+ -+---+ | | -| A | ---+-> B | -+---+ | | - +-----+ ++-----+ +| | +---+ +| B <+--| A | +| | +---+ ++-----+

Result: A new docktree will be created. "A" will be resized to the size of "B". Both will be put into a TLazDockPages control which is the child of the newly created TDockTree. @@ -16187,7 +16218,7 @@ if MyControl.CanSetFocus then |[B][A] | |+-----+| || || -|| A || +|| A || || || |+-----+| +-------+ @@ -17106,9 +17137,11 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom] - + Determines if the color for the control is the system default (GTK). - Used by GTK-based widget set classes to determine if the color in a control needs to be compares to the SYS_COLOR_BASE value used in the widget set. +

+ Used by GTK-based widget set classes to determine if the color in a control needs to be compares to the SYS_COLOR_BASE value used in the widget set. +

@@ -17120,22 +17153,28 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom] - - + Gets the inverse alignment value when BiDiMode is enabled. + +

+ Applies to TAlignment value taLeftJustify and taRightJustify. taCenter is always taCenter regardless of BidiMode. +

+
- + TAlignment value converted in the method. - + True to flip the alignment value when BiDiMode is enabled. - + + Swaps left and right anchor side settings for the specified control when BiDiMode is enabled. + @@ -17544,18 +17583,25 @@ BoundsRect.Left:=3; // WRONG: common newbie mistake

Anchor docking allows one to anchor every side of a control to an arbitrary side of another control, i.e. the left side of an Edit control can be anchored to the right side of its associated Label.

- Example1 -If you want to have the top of B the same as the top of C: - +

+ Example1 +

+

+ If you want to have the top of B the same as the top of C: +

+
 +-----+  +-----+
 |  B  |  |  C  |
 |     |  +-----+
 +-----+
-
-  use
-    B.AnchorSide[akTop].Control:=C;
-    B.AnchorSide[akTop].Side:=asrTop;
-  
+
+

+ use: +

+ +B.AnchorSide[akTop].Control:=C; +B.AnchorSide[akTop].Side:=asrTop; +

When you want to have a gap between both controls, set e.g. B.Borderspacing.Right to the desired amount. Setting C.Borderspacing.Left will have the same effect, and both can be used together; the resulting gap then reflects the maximum value of both properties.

@@ -17565,21 +17611,33 @@ If you want to have the top of B the same as the top of C:

Anchor docking also allows one to center a control relative to another control.

-Example2 -For centering A relative to B: +

+ Example2 +

+

+ For centering A relative to B: +

+
++-------+
+|       | +---+
+|   B   | | A |
+|       | +---+
++-------+
+
- +-------+ -+---+ | | -| A | | B | -+---+ | | - +-------+ - -use - A.AnchorSide[akTop].Side:=asrCenter; - A.AnchorSide[akTop].Control:=B; -Or use this, it's equivalent: - A.AnchorSide[akBottom].Side:=asrCenter; - A.AnchorSide[akBottom].Control:=B; +

+ use: +

+ +A.AnchorSide[akTop].Side:=asrCenter; +A.AnchorSide[akTop].Control:=B; + +

+ Or use this, it's equivalent: +

+ +A.AnchorSide[akBottom].Side:=asrCenter; +A.AnchorSide[akBottom].Control:=B;

TControlChildSizing and TControlChildrenLayout offers additional means for aligning and separating controls. diff --git a/docs/xml/lcl/xmlpropstorage.xml b/docs/xml/lcl/xmlpropstorage.xml index 9ede3d4ff8..92a59e90e5 100644 --- a/docs/xml/lcl/xmlpropstorage.xml +++ b/docs/xml/lcl/xmlpropstorage.xml @@ -347,13 +347,210 @@ - - This class is present on the source but seems not be used. - + + Implements a configation storage mechanism using XML-tagged content. + + +

+ TXMLConfigStorage is a TConfigStorage descendant which implements an XML-storage mechanism for configuration or other values. +

+

+ TXMLConfigStorage allows names (paths) and values to be accessed using an XPATH-like syntax. +

+

+ It provides implementations of the abstract virtual methods defined in the ancestor class. It provides overridden constructors that allow the class instance to be created for a qualified file name, a TXMLConfig instance, a subset of values in a TXMLConfig instance, or a stream. Internally, it use TXMLConfig as the storage for values in the class instance. +

+

+ Use the XMLConfig property to access the internal storage for class instance. Use the overridden methods to read, write, or delete the names and values in the class instance. For example: +

+
    +
  • DeleteFullPathValue
  • +
  • GetFullPathValue
  • +
  • SetDeleteFullPathValue
  • +
  • SetFullPathValue
  • +
+
- - + + + + + + + + + + + + + Gets the String value stored at the specified path in the XML storage. + +

+ Calls the GetValue method for the internal TXMLConfig instance. +

+
+ +
+ + + Value retrieved from the internal storage, or ADefault when the path is not found. + + + + Path to the XML node with the requested value. + + + Default value returned if APath is not found in the internal storage. + + + + Sets the value for the specified path. + + + + + Path to the XML node where the value is stored. + + + Value stored in the XML node for the specified path. + + + + Sets the value for or deletes the XML node at the specified path. + + + + + Path to the XML node with the value updated or removed in the method. + + + + Value for the specified path. An empty value causes the path to be removed. + + + + + Deletes the XML node and its content and the specified path. + + + + + Path to the XML node removed in the method. + + + + Deletes the value stored in the XML node at the specified path. + + + + + Path to the XML node with the value removed in the method. + + + + + Removes all XML nodes stored in the XMLConfig storage. + +

+ Calls the Clear method in XMLConfig. +

+
+ + + +
+ + + Constructor for the class instance. + +

+ Create is the overridden, overloaded constructor for the class instance. The overloaded variants allow the XML content to read from various sources like a file name, a TXMLConfig instance, a scoped TXMLConfig instance, or a TStream instance. +

+

+ Use WriteToDisk or SaveToStream to speciy where the XML content is stored . +

+
+ +
+ + Qualified file name where the XML content is stored. + + + + True to load existing XML content from the file, or False to create an empty storage. + + + + TXMLConfig instance where the XML paths and values are stored. + + + Intial path for values read and written in the class instance. + + + Stream with the XML content loaded in the XMLConfig storage. + + + + Destructor for the class instance. + +

+ Destroy is the overridden destructor for the class instance. It uses the value in FreeXMLConfig to determine whether the TXMLConfig instance in XMLConfig is freed in the method. When set to True, XMLConfig is freed and set to Nil. +

+

+ Destroy calls the inherited destructor prior to exiting from the method. +

+
+ + + + + +
+ + + TXMLConfig with the values accessed and maintained in the class instance. + + Read-only TXMLConfig property. + + + + + + + Indicates whether the TXMLConfig instance is freed when the class is destroyed. + + +

+ FreeXMLConfig is a Boolean property which indicates if the TXMLConfig instance in XMLConfig is freed when the class instance is destroyed. +

+
+ +
+ + + Stores the values in XMLConfig to the specified file name. + + + + + + Gets the file name passed as an argument to the constructor. + + + + + File passed as an argument to the overloaded constructor. + + + + Saves the content in XMLConfig to the specified TStream instance. + + + + + TStream instance where the XML content is stored. +