From 40046780a454bca28fc32673994906a464f9cbd3 Mon Sep 17 00:00:00 2001 From: dsiders Date: Sun, 17 Sep 2023 02:48:31 +0100 Subject: [PATCH] Docs: LCL/comctrls. Updates content in THeaderSection topics. * THeaderSection.Assign * THeaderSection.Alignment * THeaderSection.ImageIndex * THeaderSection.MaxWidth * THeaderSection.MinWidth * THeaderSection.Text * THeaderSection.Width * THeaderSection.Visible * THeaderSection.OriginalIndex --- docs/xml/lcl/comctrls.xml | 242 +++++++++++++++++++++++++++++++++++--- 1 file changed, 228 insertions(+), 14 deletions(-) diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 543e73bc33..071c25e787 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -39327,16 +39327,42 @@ default values for properties in the class instance. -Assign - if Source is of correct type, copies -properties directly, otherwise calls inherited Assign which -probably raises an exception. +Implements object persistence for the THeaderSection type. + +

+Assign is an overridden method in THeaderSection. It +extends the inherited method to provide support for persistent objects using +the THeaderSection type. +

+

+If Source is a THeaderSection instance, the following properties are +copied into the current class instance: +

+
    +
  • ImageIndex
  • +
  • Text
  • +
  • Width
  • +
+

+The Changed method is called to notify the collection that the current item has +been updated. +

+

+If Source is not derived from THeaderSection, the inherited method (in +TPersistent) is called using Source as an argument. An EConvertError exception +is raised in the inherited method if Source has not been assigned. +

+
+TCollectionItem TPersistent.Assign
- + +Persistent object with the property values copied to the current class instance. + @@ -39359,29 +39385,197 @@ selected) or pressed (selected). Alignment - whether text is to be left or right justified or centered. + +

+Alignment is a TAlignment property which indicates the +horizontal alignment used to display the Text for the header section. The +default value for the property is taLeftJustify as assigned in the Create +constructor. See TAlignment for the +values allowed in the property. +

+

+Changing the value for the property causes the Changed method to be called to +update the item in its collection. +

+

+Alignment is used in the PaintSection method in TCustomHeaderControl when the +image, text, and drawing state are used to render the section on the control +canvas. +

+
+ + + + + + + +TAlignment +
-Index of the image in the imagelist. + +Ordinal position for the image displayed for the header section. + + +

+ImageIndex is a TImageIndex property with the ordinal +position for an image displayed on the header section. The default value for +the property is -1 and indicates that a value has not been assigned for the +property. Changing the value for the property causes the Changed method to be +called to update the item in its collection. +

+

+ImageIndex refers to the position in the Images property in an associated +THeaderControl. It is used, along with Text and Alignment, in the PaintSection +method in TCustomHeaderControl / THeaderControl. The values control the content +rendered for the header section on the control canvas. +

+
+ + + +
-Maximum permissible width of a section. + +Maximum width in pixels allowed for the header section. + + +

+MaxWidth is an Integer property with the maximum size in +pixels for the content displayed for the section on the header control. It +includes the image, text, and any padding used between the elements for the +section. +

+

+The default value for the property is an arbitrarily large value (10000). +Changing the property causes the new value to be validated; it cannot exceed +10000 and cannot be smaller than the value in the MinWidth property. The value +in the Width property is range-limited to the new values in MinWidth and +MaxWidth. The collection is updated when MaxWidth has been changed in the +collection item. +

+
+ + + +TCollectionItem +
-Minimum permissible width of a section (default = 0). + +Minimum width in pixels allowed for the header section. + + +

+MinWidth is an Integer property with the minimum width in +pixels allowed for the content displayed for the section on the header control. +The default value for the property is 0 (zero). +

+

+Changing the property value causes the new value to be validated; it cannot be +less than 0 and cannot exceed the value in the MaxWidth property. The value in +the Width property is range-limited to the new values in MinWidth and MaxWidth. +The collection is updated when MinWidth has been changed in the collection item. +

+
+ + + +TCollectionItem +
-The text string that is to appear in the section. + +The text displayed on the header section. + + +

+Text is a TCaption property which contains the textual +value displayed on the header section. Along with the image specified in +ImageIndex, it determines the content drawn for the section in the PaintSection +method of the THeaderControl. +

+

+Changing the value for the property causes the collection item to be updated in +its collection. +

+

+Use Alignment to set the horizontal alignment for the value in Text. +

+

+Use ImageIndex to specify the position for the image drawn on the header +section. +

+

+Use Visible to indicate whether the header section is visible on the header +control. +

+

+Use Width to specify the cumulative width for the image and text on the header +section. +

+
+ + + + + + + + + +TCollectionItem +TCollection +
-The Width of the section that appears on the -THeaderControl. +Total width in pixels for the text and image on the header section. + +

+Width is an Integer property with the number of pixels +allocated for the text and image on the header section. It does not indicate +the actual width of the content - only the size allocated for its display. +

+

+The Width property always returns 0 (zero) when Visible is set to False. +

+

+Setting a new value for the property causes it to be range-limited to the +values in MinWidth and MaxWidth. The item is updated in its collection when +Width has been changed. +

+

+The value in the property may be automatically scaled for high DPI displays in +the DoAutoAdjustLayout and ChangeScale methods for the header control. +

+

+Width is updated at design-time when the divider between adjacent header +sections is dragged. +

+

+Use MinWidth and MaxWidth to specify the smallest and largest sizes allowed for +the header section. +

+
+ + + + + + + + + +
@@ -39391,7 +39585,7 @@ The Width of the section that appears on the Visible is a Boolean property which indicates if the header section is visible in the header control. When set to False, the section cannot be drawn using the TCustomHeaderControl.PaintSection -method. +method, and the Width for the section is 0.

The default value for the property is True, as set in the constructor @@ -39402,9 +39596,27 @@ for the class instance. -OriginalIndex - index which doesn't change when the user reorders -the sections. +Index position which does not change when the user reorders the sections on a +header control. + +

+OriginalIndex is an Integer property which contains the +index order for the section when it was added to its Owner collection. The +property value is assigned when the class instance is created in the AddItem +method in THeaderSections. It normally contains the value in Index unless the +value is already in use in the collection. +

+

+OriginalIndex may be updated when Delete in the THeaderSections is used to +remove a header section from the collection. +

+ + + + +TCollectionItem.Index +
@@ -39522,10 +39734,12 @@ the change. Creates a new header section and adds it to the collection.

-Adds calls the AddItem method to get the return value for the method. +Add calls the AddItem method to get the return value for the method.

+ + TCollection.Add