diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml
index d3b374cb7d..2c3c6f48d3 100644
--- a/docs/xml/lcl/comctrls.xml
+++ b/docs/xml/lcl/comctrls.xml
@@ -101,33 +101,41 @@
+ THitTests is the type returned from controls which implement the GetHitTestInfoAt method.
+
GetCount is an overridden method in TNBPages, and returns the number of items stored in PageList.
@@ -1998,11 +2002,13 @@ end;
GetObject is an overridden method in TNBPages, and redirects indexed object access to the PageList property. The return value is a TObject instance, and must be cast to TCustomPage to access its properties and methods.
@@ -2024,16 +2030,25 @@ end;
+ Stores the value in S to the Caption property for the TCustomPage instance in PageList.
+
+ TDrawTabEvent is not used in the current LCL implementation.
+
@@ -3832,7 +3857,7 @@ end;
@@ -3907,7 +3932,7 @@ end;
+ Client cannot be added directly to TPageControl, but a new TabSheet should be added and client placed on it.
+
- TListItem is the type used in the TListItems container.
+ TListItem is the type stored in the TListItems container.
+ WSUpdateAllowed is a Boolean function used to determine whether the list item can be modified based on internal flags and the state for the owner control. It checks the following to determine the return value:
+
+ When all of these conditions are met, the return value is set to True.
+
+ WSUpdateAllowed is called prior to reading or writing values for properties including: State, StateIndex, ImageIndex, Checked, Cut, DropTarget, Focused, and Selected.
+
+ Delete checks the internal TListItemFlags values for the class instance to ensure that Delete has not already been called for the list item.
+
+ If lifDestroying is not included in the flags, the Free method called to free the class instance. No actions are performed in the method if lifDestroying is already included in the flag values.
+
+ Delete is called from the Delete method in TListItems. It is also called when TListItems is notified that the list item has been freed in Destroy.
+
+ MakeVisible is a method used to make the list item partially or fully visible in a list view control. MakeVisible checks for valid Owners in both the TListItems container and the TCustomListView control. When both are available, and the handle for the list view control has been allocated, the widgetset class is notified to display the list item.
+
+ When PartialOK is set to True, the list item does not have to become fully visible.
+
- DisplayRect - returns the coordinates of a rectangle for displaying the current item.
-
- Display codes can be: drBounds, drIcon, drLabel, drSelectBounds.
+ DisplayRect calls methods in the widgetset class to get the TRect instance with the coordinates for the item region in Code. Code can contain one of the values from the TDisplayCode type, including:
- DisplayRectSubItem - returns the coordinates of a display rectangle for a specified sub-item.
+ DisplayRectSubItem calls methods in the widgetset class to get the TRect instance with the coordinates for the sub-item region in Code. Code can contain one of the values from the TDisplayCode type, including:
- Display codes can be: drBounds, drIcon, drLabel, drSelectBounds.
+ SubItem contains the ordinal position in SubItems property with the text for the sub-item.
+ EditCaption is a Boolean function used to select the list item on its list view control, and display its Editor control. The return value is True if the list item is the Selected item for the control and the editor was successfully displayed.
+
+ EditCaption clears any existing selections in the list view control in Owner, and assigns the class instance to the Selected property. No additional action are performed in the method when the list view control is ReadOnly, or an Editor has not been assigned for the control. The return value is set to False.
+
+ EditCaption calls the private ShowEditor method in the list view control to display and set focus to the editor. The editor control may not become visible if the OnEditing event handler in the list view control indicates the list item cannot be edited.
+
- GetStates is a TListItemStates function used to get the state values for an item in a list view control. The state values are retrieved using methods in the widgetset class for the TCustomListView control which owns the list item. If the widgetset class does not return the values, the return value contains the existing values in the States member for the TListItem instance.
+ GetStates is a TListItemStates function used to get the state values for an item in a list view control. The state values are retrieved using methods in the widgetset class for the TCustomListView control which owns the list item. If the widgetset class does not return the values, the return value contains the existing values in the States member for the TListItem instance.
+ Caption is a String property with the text displayed for the list item. It is also used as the Name displayed for the class instance in the Lazarus Object Inspector.
+
+ The property value is assigned when TCustomListView.AddItem creates the TListItem instance in its Items property. Changing the value for the property causes the list view control to be notified when WSUpdateAllowed returns True.
+
+ Caption is used in the TCustomListView.DrawItem method to draw the text for the list item. It provides the initial value displayed when the editor is activated for an item on the list view control, and is updated when editing is completed.
+
+ Checked is a Boolean property which indicates if a check mark is displayed for the list item. Checked allows specific list items to be marked for inclusion in methods for the list view control, such as Sort.
+
+ The property value is read from and written to the TCustomTreeview widgetset class instance when its handle is valid and its Checkboxes property is set to True.
+
+ Cut is a Boolean property which reflects whether the value lisCut has been included in the TListItemState flags for the list item. The property value is retrieved from and written to the widgetset class for the TCustomTreeView control when its handle has been allocated.
+
+ Data is an untyped Pointer property with a pointer to arbitrary data for the list item. The value for the property is stored when the list item is created in TCustomListView.AddItem.
+
+ Data can be used to order list items in TCustomListView.Sort when the SortType property is set to [stData].
+
+ DropTarget is a Boolean property which indicates if the list item is a highlighted drop target in the list view control. It value is True when the TListItemState values for the item contain lisDropTarget.
+
+ The property value is read from and written to the widgetset class instance for the list view control when its handle is valid. It is updated when the TCustomListView.GetNextItem method is called for the lisDropTarget state.
+
+ Focused is a Boolean property which contains True when the list item is focused on the list view control. The property value is read from and written to the widgetset class instance for the list view control when its handle is valid. Changing the value for the Focused property in TCustomListView causes the value in the list item to be updated.
+
+ Index is a read-only Integer property with the position where the list item in stored in its TListItems container. The property value is retrieved by calling the IndexOf method in the Owner (TListItems) to locate the class instance. The property value is -1 if Owner has not been assigned, or the list was removed from the container.
+
+ Use the Move or Exchange methods in TListItems, or the sort routines in TCustomListView, to change the position where a list item is stored in its container.
+
+ ImageIndex is a TImageIndex property with the position for the image displayed for the list item. It is the ordinal position in the LargeImages or SmallImages properties in the ListView for the item.
+
+ The default value for the property is -1, and indicates that an explicit value has not been assigned. ImageIndex can be assigned at design-time in the Lazarus Object Inspector, or at run-time. Changing the property value causes the ListView widgetset class to be updated when its handle has been assigned.
+
+ Use StateIndex to specify the position for the state image used on the list item.
+
+ Left is an Integer property which contains the coordinate for the left edge of the list item on its list view control. The property value is read from and written to the Position property in the list item; it represents the X member in the TPoint instance. Setting a new value for the property causes the TPoint instance in Position to be re-allocated, and the widgetset class is notified of the change to the value.
+
+ Values in Left and Top are used in the TCustomListView.DrawItem method to position the list item on the canvas for the list view control.
+
+ Use Top for the coordinate where the top edge of the list item is located.
+
+ Use Index to access the ordinal position for the list item in its TListItems container.
+
+ ListView is a read-only TCustomListView property which provides access to the list view control where the list item is displayed. It allows the list item to access properties and methods in its owner control. The property value is determined by checking the TListItems owner for its TCustomListView owner.
+
+ Owner is a read-only TListItems property with the container where the list item is stored. The property value is assigned in the Create constructor to the TListItems instance passed as an argument. Owner allows the list item to access properties and methods in the container class instance from within its implementation. It also provides access to properties and methods in the list view control where the list item is displayed.
+
+ Position is a TPoint property with the coordinates where the list item is displayed on its ListView control. The property value is read from and written to the widgetset class instance for the ListView control when its handle has been allocated. The X and Y members in the property are used as the values for the Top and Left properties (respectively). Changing the values in the X and Y members, or in Top and Left, cause the widgetset class to be notified of the new value(s).
+
+ Use Index to access the ordinal position for the list item in its container.
+
+ StateIndex is a TImageIndex property with the position for the image used to represent the state for the list item. It is the position in the StateImages for the ListView control, or -1 when a value has not been explicitly assigned to the property. Changing the property values causes the widgetset class instance for the ListView control to be updated.
+
+ StateIndex is normally updated when the ListView control changes the usage context for the list item, and uses the set type returned from the GetStates method. StateIndex values and their TListItemStates equivalents:
+
+ SubItems is a TStrings property with text displayed for additional columns when the ListView control sets its ViewStyle property to vsReport. Column 0 always contains the Caption for the list item. Values in SubItems are displayed starting at column number 1 and continue through the number of columns defined on the list view control. In other words, column 1 is SubItems[0]. Column 2 is SubItems[1]. Ad infinitum.
+
+ Values in Subitems can assigned at design-time using the Items property editor in the Lazarus IDE. They can also be assigned at run-time. Maintain the Columns property in the ListView control to match the number of columns needed for the values in SubItems.
+
+ SubItemImages is an indexed Integer property which gets the position for an image associated with the value in SubItems at the position specified in AIndex. The property value contains the ImageIndex for the sub-item assigned at design-time using the Items property editor in the Lazarus Object Inspector.
+
+ The property value is the position in SmallImages in the ListView control. The image is displayed to the left of the caption for the sub-item. -1 indicates that an image index value was not explicitly assigned for the sub-item.
+
+ Top is an Integer property which contains the top coordinate for the list item on its list view control. The property value is read from and written to the Position property in the list item; it represents the Y member in the TPoint instance. Setting a new value for the property causes the TPoint instance in Position to be re-allocated, and the widgetset class is notified of the change to the value.
+
+ Values in Left and Top are used in the TCustomListView.DrawItem method to position the list item on the canvas for the list view control.
+
+ Use Left for the coordinate where the left edge of the list item is located.
+
+ Use Index to access the ordinal position for the list item in its TListItems container.
+
+ Values from the TListItemsFlag enumeration are stored in the TListItemFlags set type, and used to implement the Flags property in TListItems.
+
+ TListItemsFlags is a set type used to store zero or more values from the TListItemsFlag enumeration. It is used to implement the Flags property in TListItems.
+
+ TListItems is a TPersistent descendant which implements the container used to store TListItem instances used in a TCustomListView control. The Owner of the container is the TCustomListView control passed as an argument to the constructor.
+
+ TListItems is the type used to implement the Items property in TCustomListView.
+
+ TListItems provides properties and methods needed to maintain and access the TListItem instances stored in the list for the container. Item is the default property for the class instance and allows access to the list items by their ordinal position in the container. It also the target for an enumerator using the TListItemsEnumerator supported in the class instance.
+
+ TListitems has a built-in cache for the last accessed item. This will speed up interface updates since Item.Index is often used for the same item updating more properties. If FCacheIndex contains -1 then the cache is not valid.
+
+ DefineProperties is an overridden method in TListItems. It implements the virtual method defined in TPersistent. DefineProperties associates property names with the read and write routines used during LCL component streaming.
+
+ In TListItems, DefineProperties identifies the private methods used to read and write the binary values with support for 32- or 64-bit integer values and the pointer for the Data property (when used).
+
+ Ensures that lisfWSItemsCreated is removed from the Flags property.
+
+ ClearSelection iterates over the values in Item and updates a TListItem instance when its State flags include the value lisSelected. The lisSelected flag value is removed from the internal member for the TListItem instance(s). The OnSelectItem event handler for the list view control is signalled (when assigned) for each of the Item instances updated in the method.
+
+ Use SelectAll to select all of the list items in the container.
+
+ SelectAll iterates over the Item values in the container, and enables the selected state for any TListItem instance not already selected.
+
+ SelectAll checks the internal state values for each of the list items to determine if lisSelected has been included in the flags. When not present, it is added to the TListItemStates set for a list item.
+
+ The OnSelectItem event handler in the list view control is signalled (when assigned) for each of the TListItem instances updated in the method.
+
+ Use ClearSelection to clear the selected state for all of the list items in the container.
+
+ Add is a TListItem function used to create a new list item instance and add it to the container. The return value contains the TListItem instance created in the method, and stored in the internal list for the container.
+
+ When a list view control has been assigned to Owner, its CreateListItem method is called to create the new list item. A custom item class can be provided using the OnCreateItemClass event handler in the list view control. Otherwise, TListItem.Create is called to create the list item using the container class instance as the Owner.
+
+ Add calls the AddItem method to store the new TListItem instance. The widgetset class is notified of the new cached item when its handle is available. The ItemInserted method in Owner is called to execute an overridden InsertItem method (when available) or signal the OnInsert event handler for the list view control (when assigned).
+
+ Use Insert to create a new list item and store it at a specified position in the container.
+
+ AddItem is method used to add the list item specified in AItem to the storage for the container.
+
+ The position for the list item in internal storage and the class instance are stored in local cache entries. The widgetset class for the list view control is notified when its handle is allocated of the updated cache values.
+
+ If a list view control has been assigned to Owner, its ItemInserted method is called. ItemInserted can execute an overridden InsertItem method (when available) or signal the OnInsert event handler for the list view control (when assigned).
+
+ Use InsertItem to store a list item at a specified position in the internal storage for the container.
+
+ BeginUpdate calls the corresponding method for the list view control in Owner.
+
+ Use EndUpdate to finish an update process.
+
+ Clear calls the Delete method to remove each of the TListItem class instances in the internal storage for the container.
+
+ Clear is called from the TCustomListView.Clear method. It is also called immediately before values are loaded into the container during LCL component streaming.
+
+ Create is the overridden constructor for the class instance, and calls the inherited method on entry. It allocates resources for the list used to store the items in the container. The value in AOwner is assigned to the Owner property, and the cache index is initialized.
+
+ Destroy is the overridden destructor for the class instance. It frees each of the TListItem instances in the internal storage for the container and removes the cache entries for the items. Resource allocated to the internal list are freed as well. Destroy calls the inherited destructor prior to exiting from the method.
+
+ Delete accesses the list item in the internal storage, casts it to the TListItem type, and calls its Delete method to free the class instance.
+
+ EndUpdate completes the update started in BeginUpdate. Endupdate calls the corresponding method for the list view control in Owner.
+
+ Exchange is a method used to swap the positions for the list items specified in the AIndex1 and AIndex2 arguments. No actions are performed in the method when AIndex1 and AIndex2 have the same values.
+
+ An Exception is raised if AIndex1 or AIndex2 contain a value that is not a valid ordinal position in the container. (< 1 or > Count-1).
+
+ Values in the Selected and ItemFocused properties for the list view control are saved prior to swapping the list items. These properties are restored prior to exiting from the method. Flags in the list view control are updated to include lffItemsMoving when the operation is started. The flag value is removed when the operation is completed.
+
+ Exchange calls the TFPList.Exchange method to change the positions for the specified list items in the internal storage for the container. The list item in AIndex1 becomes the active cache item after the values have been swapped. The widgetset class for the list view control is notified of the change when its handle is allocated.
+
+ Use Move to relocate a list item to a specific ordinal position in the container.
+
+ Use InsertItem to insert a list item at a specific position in the container.
+
+ Move is a method used to relocated a list item at a specified position to a new position in the container. The original position is specified in AFromIndex. The new position is specified in AToIndex.
+
+ An Exception is raised if AFromIndex or AToIndex contain a value that is not a valid ordinal position in the container. (< 1 or > Count-1).
+
+ Values in the Selected and ItemFocused properties for the list view control are saved prior to moving the list item. These properties are restored prior to exiting from the method. Flags in the list view control are updated to include lffItemsMoving when the operation is started. The flag value is removed when the operation is completed.
+
+ Move calls the TFPList.Move method to change the positions for the specified list item in the internal storage for the container. The list item in AToIndex becomes the active cache item after the item has been moved. The widgetset class for the list view control is notified of the change when its handle is allocated.
+
+ Use Exchange to swap the positions for two list items in the container.
+
+ Use InsertItem to insert a list item at a specific position in the container.
+
+ FindCaption is a TListItem function used to find the first list item in the container which matches the specified search criteria. The return value is the TListItem instance with a Caption that matches the specified Value, or Nil when a match is not found.
+
+ No actions are performed in the method, and the return value is Nil, when there are no list items in the container (Count = 0), or StartIndex is not valid.
+
+ FindCaption visits the TListItem entries in the container to compare Value to the Caption in the list item. Use Partial and PartStart to indicate if (and how) partial matches are performed. Case is significant in the comparison.
+
+ Use FindData to locate a list item which contains the specified binary value in its Data property.
+
+ FindData is an overloaded method used to find the first TListItem instance with a Data property that matches the specified value.
+
+ The overloaded variants allow either a pointer to the value to locate in Data, or use of a starting position and wrapping in the search criteria.
+
+ The variant with a Pointer argument checks the cached list item for a matching value. When found, no other actions are performed in the method.
+
+ Otherwise, each of the TListItem instances in Item is visited to compare the pointer value to the Data property in the list item. When a match is found, the list item becomes the active cache entry for the container.
+
+ The variant with search criteria works differently. It does not check the active cache entry before starting its search. Use StartIndex to specify the initial list item in the container checked as a match for the pointer in Value. Use Inclusive to specify whether StartIndex is included in the search, or the next list item is used. Set Wrap to True to allow the search to continue at the first item in the container when a match is not found. In this variant, the active cache entry is not updated when a match is found.
+
+ The return value is Nil if a list item is not found (in the cache or in Item) containing the specified value.
+
+ Use FindCaption to locate a list item with a specified value in its Caption.
+
+ Item is an indexed TListItem property which allows access to the list items in the container by their ordinal position. AIndex specified the TListItem instance returned as the property value, and must be in the range 0..Count-1.
+
+ Item is also the default property for the class instance and the target for an enumerator.
+
+ Reading a property value causes the list item cache for the container to be checked. If the cached item has the index value in AIndex, it is used as the property value. Otherwise, the TListItem instance at AIndex is used. The cache is updated with the new list item and its index value.
+
+ Writing a new property value causes AIndex to validated. No actions are performed during property assignment if AIndex exceeds Count-1. In addition, no actions are needed when the new property value is the same TListItem instance as the existing property value.
+
+ Otherwise, the new list item is stored at the position in AIndex and the cache is updated with the list item and its index value. The widgetset class is notified of the changed values when its handle has been allocated. This includes changes to Caption, ImageIndex, SubItemImages, and Checked properties, as well as internal state flags.
+
+ Owner is a read-only TCustomListView property with the list view control that is the owner of the class instance and the list items stored in the container. Owner allows both the container and the list items in the container to access properties and methods in the list view control from within their methods.
+
+ The value for property is assigned in the Create constructor using the argument passed to the method.
+
+ TWidth is an Integer range type with values in the range 0..MaxInt. TWidth is the type used to implement the WidthType, MinWidth, MaxWidth, and Width properties in TListColumn.
+
- Left or right justified, or centered.
+ Alignment is a TAlignment property with the horizontal alignment for the text displayed in the column. It affects both the column Caption and any list item or SubItem values in the column.
+
+ Use taRightJustify to align text values to the right edge for the column. Use taCenter to center text values in the width for the column.
+
+ The default value for the property is taLeftJustify. Changing the value for the property calls the Changed method to update the column in its Collection. The widgetset class for the list view control is notified of the new alignment value when its handle is valid.
+
+ AutoSize is a Boolean property which indicates if the column is automatically resized to fit the longest text value displayed in the column. The default value for the property is False.
+
+ Set AutoSize to True to enable auto-sizing for the column. Values in the Width, MinWidth, and MaxWidth properties are ignored when AutoSize is enabled.
+
+ Changing the value in AutoSize causes the Changed method to be called to updated the column in its Collection. The widgetset class for the list view control is notified of the changed value when its handle has been allocated.
+
+ Please note that the length of the Caption is not taken into consideration when calculating the auto-sized width. This can result in the Caption being truncated when the calculated width is too small.
+
+ Use the TCustomListView.AutoWidthLastColumn property to resize the last column to fill the unused area on the list view control. You cannot use both for the last column in the collection. The last property enabled takes precedence.
+
+ Caption is a TTranslateString property with the caption text or heading displayed for the column. When the list view control uses vsReport in its ViewStyle property and has enabled ShowColumnHeaders, Caption is displayed as the column header on the control.
+
+ Changing the value for the property causes the Changed method to be called to update the list column in its Collection. The widgetset class is notified of the changed value when its handle has been allocated. This includes forwarding the current value in AutoSize if it has been enabled.
+
+ Use of the TTranslateString type for the property allows the value to be translated using the i18n facilities in the Lazarus IDE.
+
+ ImageIndex is a TImageIndex property with the ordinal position for the image displayed for the column. It refers to a position in the SmallImages or LargeImages for the list view control. The default value for the property is -1, and indicates that an explicit value has not been assigned for the property or that images are not available.
+
+ Changing the property values causes the Changed method to be called to update the list column in its Collection. The widgetset class for the list view control is notified of the new property value when its handle has been allocated.
+
+ MaxWidth is used to constrain the width for the column to a maximum number of pixels. It is used, along with MinWidth, to range limit the value in Width at design-time or when resized with a mouse.
+
+ MinWidth, MaxWidth, and Width are not used when AutoSize is enabled; the values are ignored and the column width is determined by the content in the column.
+
+ MixWidth is used to constrain the width for the column to a minimum number of pixels. It is used, along with MaxWidth, to range limit the value in Width at design-time or when resized with a mouse.
+
+ MinWidth, MaxWidth, and Width are not used when AutoSize is enabled; the values are ignored and the column width is determined by the content in the column.
+
+ Tag has no predefined meaning or usage. It is available for any application-specific purpose. The Clipper cargo cult lives on.
Visible is a Boolean property which indicates if the column is visible on the list view control where it is defined. The default value for the property is True.
- Changing the property value causes the item to updated in its collection, and any observers are notified of the change. The widgetset class instance is also notified when its handle has been allocated.
+ Changing the property value causes the item to updated in its collection, and any observers are notified of the change. The widgetset class instance is also notified of the change when its handle has been allocated.
- Set AutoSize to True to automatically resize the column to its content and the available space on the associated list view control.
+ Set AutoSize to True to automatically resize the column to its content and the available space on the associated list view control. Values in MinWidth, MaxWidth, and Width are ignored when AutoSize is enabled.
- Reflects the sort direction or order for the column on the associated list view control.
+ SortIndicator is a TSortIndicator property which indicates the sort direction or order for the content displayed in the column. The default value for the property is siNone, and means a sort indicator is not displayed for the column.
+
+ Changing the value for the property causes the Changed method to be called to update the column in its Collection. The widgetset class for the list view control is notified of the changed value when its handle has been allocated.
+
+ SortIndicator is used in conjunction with the SortColumn, SortType, AutoSort, and AutoSortIndicator properties in TCustomListView. The visual sort indicator is displayed in the column heading when the list view uses vsReport in its ViewStyle property.
+
+ Assigning a value other than siNone to the property causes the image in ImageIndex to be removed from the column heading. Nota bene: This is the observed behavior for the Windows platform. Other platforms may vary.
+ Create is the constructor for the class instance, and reimplements the inherited method. TheOwner contains the TCustomListView control that owns the collection, instead of the item class used in the ancestor. TheOwner is assigned as the value for the Owner property.
+
+ Create calls the inherited constructor using TListColumn as the item class type for the collection.
+
+ Destroy is the overridden destructor for the class instance. It ensures that BeginUpdate and EndUpdate are used to enclose actions performed in the method. Destroy calls the inherited destructor to clear and free the internal storage for the collection.
+
+ Update is an overridden method in TListColumns. It checks whether the update is actually needed for the collection when the value in Item is Nil. If the collection update is required, Item is set to the internal collection item that has been cached for the action. This occurs when the collection calls its Changed method with its AllItems argument set to True.
+
+ Update calls the inherited method using the value in Item as an argument.
+
+ Add is a TListColumn function used to create and return a new TListColumn instance. It calls the inherited method to create a new instance of the ItemClass for the collection, and casts it to the TListColumn type used in the return value.
+
+ At design-time, the form designer surface for Owner (TCustomListView) is notified of the change when Owner has been assigned.
+
- Items is the default property for the collection, and the target for an enumerator used with the class instance.
+ Items is a TListColumn property used to provide indexed access to TListColumn instances in the collection by their ordinal position. The read and write access specifiers for the property are reimplemented to use the TListColumn type used as the ItemClass in the collection.
+
+ Items is the default property for the collection, and the target for an enumerator created for the collection.
+
+ Use Add to create and store a new TListColumn instance in the collection.
+
+ Free a TListColumn instance to remove it from the values in Items.
@@ -9220,7 +9926,11 @@ end;
+ TSortDirection is the type used to implement the SortDirection property in TCustomListView.
+
+ OnEdited is a TLVEditedEvent property with the event handler signalled when the caption for a list item has been updated using the editor for the control. It occurs prior to saving the value in the AValue argument to the TListItem instance, and allows the new value to be validated and optionally modified.
+
+ OnEdit is signalled from the DoEndEdit method when an overridden Edit method is not used in the class instance, and the event handler has been assigned. It occurs when the private HideEditor method is called for the control.
+
+ OnEditing is a TLVEditingEvent property with the event handler used to determine if a list item can be edited in the control. Arguments passed to the event handler included the control (TCustomListView), the list item (TListItem), and an updatable Boolean argument which indicates if editing is allowed for the list item. Set the AllowEdit argument to False to prevent the list item from being edited.
+
+ OnEditing is signalled (when assigned) from the CanEdit method, and determines the return value for the function. It occurs when the private ShowEditor method is called for the list view control.
+
+ OnInsert is a TLVInsertEvent property with the event handler signalled when a new TListItem instance is stored in the Items property. Arguments to the event handler include the object (TCustomListView) for the notification and the TListItem instance for the action.
+
+ OnInsert is signalled (when assigned) from the DoInsert method, and occurs when the ItemInserted method is called. This happens after the list item has been added to a TListItems container.
+
+ OnCustomDraw is a TLVCustomDrawEvent property with the event handler signalled when a custom draw operation is handled by the LCL interface. It is signalled from the CustomDraw method when the drawing stage for the control is cdPrePaint.
+
+ Arguments to the event handler include the control, the display rectangle for the operation, and a variable parameter that indicates whether default drawing is performed by the list view control.
+
+ OnCustomDraw occurs when the widgetset class for the control calls the IntfCustomDraw method and the list view control is the draw target.
+
+ Use OnAdvancedCustomDraw to perform custom drawing when the drawing state has a value other than cdPrePaint.
+
+ Use OnCustomDrawItem and OnAdvancedCustomDrawItem to perform custom drawing for the list items on the control.
+
+ Use OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem to perform custom drawing for the list sub-items on the control.
+
+ OnCustomDrawItem is a TLVCustomDrawItemEvent property with the event handler used to perform custom drawing for a list item on a list view control. It is signalled (when assigned) from the CustomDrawItem method when the drawing stage is cdPrePaint, and occurs when the IntfCustomDraw method handles callbacks from the widgetset class instance.
+
+ Arguments to the event handler include the list view control, the list item drawn in the handler, and a variable parameter which indicates whether default drawing is handled in the list view control.
+
+ Use OnAdvancedCustomDrawItem to perform custom drawing for list items when the drawing stage is a value other than cdPrePaint.
+
+ Custom drawing event handlers are used when the IntfCustomDraw method handles callbacks from the widgetset class instance.
+
+ Use OnCustomDraw and OnAdvancedCustomDraw to perform custom drawing for the entire list view control.
+
+ OnCustomDrawSubItem is a TLVCustomDrawSubItemEvent property with the event handler used to perform custom drawing for sub-items on a list view control. These are the values found in the SubItems property for each of the TListItem entries on the control.
+
+ OnCustomDrawSubItem is signalled (when assigned) from the CustomDrawSubItem method when the drawing stage is cdPrePaint, and occurs when the IntfCustomDraw method handles callbacks from the widgetset class instance.
+
+ Arguments to the event handler include:
+
+ Use OnAdvancedCustomDrawSubItem to perform custom drawing for list sub-items when the drawing stage is a value other than cdPrePaint.
+
+ Custom drawing event handlers are used when the IntfCustomDraw method handles callbacks from the widgetset class instance.
+
+ Use OnCustomDraw and OnAdvancedCustomDraw to perform custom drawing for the entire list view control.
+
+ Use OnCustomDrawItem and OnAdvancedCustomDrawItem to perform custom drawing for the a list item on the list view control.
+
OnDrawItem is a TLVDrawItemEvent property which is the event handler signalled to render an owner drawn item. The event is triggered (when assigned) in the DrawItem method only when OwnerDraw is set to True and ViewStyle contains vsReport.
+ Arguments to the event handler include:
+
+ OnAdvancedCustomDraw is a TLVAdvancedCustomDrawEvent property with the event handler used to custom draw the grid control. It is signalled from the CustomDraw method when the draw stage is a value other than cdPrePaint, and occurs when the IntfCustomDraw method is called by the widgetset class instance.
+
+ Arguments to the event handler include:
+
+ Use OnCustomDraw to custom draw the control when the draw stage is cdPrePaint.
+
+ Use OnCustomDrawItem and OnAdvancedCustomDrawItem to custom draw a list item on the control.
+
+ Use OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem to custom draw a sub-item for a list item on the control.
+
+ OnAdvancedCustomDrawItem is a TLVAdvancedCustomDrawItemEvent property with the event handler used to custom draw a list item on the grid control. It is signalled from the CustomDrawItem method when the draw stage is a value other than cdPrePaint, and occurs when the IntfCustomDraw method is called by the widgetset class instance.
+
+ Arguments to the event handler include:
+
+ Use OnCustomDrawItem to custom draw a list item when the draw stage is cdPrePaint.
+
+ Use OnCustomDraw and OnAdvancedCustomDraw to custom draw the list view control.
+
+ Use OnCustomDrawSubItem and OnAdvancedCustomDrawSubItem to custom draw a sub-item for a list item on the control.
+
+ OnAdvancedCustomDrawSubItem is a TLVAdvancedCustomDrawSubItemEvent property with the event handler signalled to draw the SubItems in a list item on the control. It is signalled from the CustomDrawSubItem method when the draw stage is a value other than cdPrePaint, and occurs when the IntfCustomDraw method is called by the widgetset class instance.
+
+ Arguments to the event handler include:
+
+ Use OnCustomDrawItem and OnAdvancedCustomDrawItem to custom draw the caption for a list item.
+
+ Use OnCustomDraw and OnAdvancedCustomDraw to custom draw the list view control.
+
+ Use OnCustomDrawSubItem to custom draw a sub-item for a list item on the control when the draw stage is cdPrePaint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Create sets the default values for properties and the control style flags. It creates a TChangeLink instance for the image lists in SmallImages, LargeImages, and StateImages. The change links are configured to use the ImageChange and ImageResolutionHandleDestroyed methods in their event handlers. It also creates the TCustomListViewEditor instance used to edit values in the list view control. + Create sets the default values for properties and control style flags. It creates TChangeLink instances for the image lists in SmallImages, LargeImages, and StateImages. The change links are configured to use the ImageChange and ImageResolutionHandleDestroyed methods in their event handlers. It also creates the TCustomListViewEditor instance used to edit values in the list view control.
+ Destroy is the destructor for TCustomListView. It frees the Canvas, calls the inherited Destroy, and frees the columns and list items. +
+ AddItem is a method used to create and store a new TListItem instance in the Items container. AddItem calls the Add in Items to create the TListItem instance and store it in the list storage for the container. +
++ Item contains the text used as the Caption for the list item. AObject is a object instance derived from TObject, and its address is stored in the Data property for the list item. +
++ AlphaSort is Boolean function used to apply an ascending alphabtic sort order to the list items in the control. The sort order is always applied to Column 0 (the list item and not its sub-items). +
++ AlphaSort updates values in the SortDirection, SortType, and SortColumn properties. Flag values for the control are updated to include lffPreparingSorting prior to setting the property values; this suppresses reordering until the changes are completed. +
++ SortDirection is toggled to force a new sort order to be applied. The final value is sdAscending. +
++ SortType is set to stText to use the TListItem.Caption values to determine the order for the list items. In the default comparison routine. case is significant. Use OnCompare to implement an alternate comparison routine. +
++ SortColumn is set to 0 to use the TListItem.Caption values to determine the order for the list items. +
++ lffPreparingSorting is removed from the flag values to apply the sort criteria to the list items in the control. +
++ The return value is set to True if the sort criteria is successfully applied to the list view control. +
+ Sort is a method used to reorder list items in the control using values in the SortType, SortColumn, and SortDirection properties. No actions are performed in the method when SortType is set to stNonem, or when SortColumn has a value which is not valid. SortColumn must be in the range 0..ColCount-1. +
++ Sort uses a comparison routine in the implementation section to order the values in Items. The comparison routine is passed as argument to the Sort method in Items. The routine calls the OnCompare event handler (when assigned) to determine the order for list items. If OnCompare has not been assigned, it uses the Caption or SubItems (depending on SortColumn) to determine the new order for the list items. The value in SortDirection is handled when ordering the Items. +
++ Sort saves and restores Focused or Selected items on exit. Checked items are also restored when OwnerData (or virtual mode) is not enabled. +
++ Sort is called when a column header on the list view control is clicked and AutoSort is enabled. +
++ CustomSort is a Boolean function used to sort the list items on the control using a custom sort routine to order the items. +
++ Use the ASortProc argument to specify the comparison routine needed for the custom sort. When omitted, the OnCompare event handler is used to determine the order for the list items. +
++ Use AOptionalParam to specify a pointer to an optional Integer value passed as a parameter to the sort procedure. +
++ No actions are performed when Items contains fewer than two list items, or when lffPreparingSorting has already been included in the flags for the control. +
++ CustomSort saves and restores Focused or Selected items on exit. Checked items are also restored when OwnerData (or virtual mode) is not enabled. +
++ BeginUpdate is a method which increments an internal counter used to track active updates to the control. Use this method before performing a large number or changes to the control so that the interface will not show any single step until the counter reaches 0. +
++ BeginUpdate includes the value lffPreparingSorting in the flags for the control. This suppresses reordering of list items using sort methods until the flag value is removed. When the internal update counter has the value 1, the corresponding method in the widgetset class is called when its handle has been allocated. +
++ Use EndUpdate to decrement the internal counter when an update is completed. +
++ Clears calls the corresponding method in Items to delete and free each of the list item instances in the container. +
++ EndUpdate is a method which decrements the internal counter used to track active updates for the list view control. An catchable debugger exception is raised if EndUpdate is called when an the internal counter is already 0. +
++ EndUpdate removes the value lffPreparingSorting from the flags for the control. This allows reordering of list items using sort methods to be performed. When the internal update counter reaches 0, the corresponding method in the widgetset class is called when its handle has been allocated. +
++ Repaint is an overridden method in TCustomListView. It ensures that the data index for a list item is reset to -1 when the control is using OwnerDraw (or virtual) mode. Repaint calls the inherited method to request a repaint in the widgetset class instance when its handle has been allocated. +
++ Repaint is used to implement the Refresh method for the control. +
+- GetNearestItem is used to locate a list item from a position specified in pixel coordinates relative to the top left corner of the list view. It starts looking at the position specified by the Point parameter, and moves in the direction indicated by the Direction parameter until it locates a list item.If no item is found Nil is returned. + GetNearestItem is used to locate a list item from a position specified in pixel coordinates relative to the top left corner of the list view. It starts looking at the position specified by the Point parameter, and moves in the direction indicated by the Direction parameter until it locates a list item. If no item is found Nil is returned.
- Use the Items property to access the TListItem instances with the data displayed using the column definitions. The Caption in a given list item is the value display in Column[0]. Subsequent column values use the values in SubItems; i. e. Column[1] is SubItem[0], etc. + Use the Items property to access the TListItem instances with the data displayed using the column definitions. The Caption in a given list item is the value display in Column[0]. Subsequent column values use the values in SubItems; i. e. Column[1] is SubItem[0], Column[2] is SubItem[1], ad infinitum.
GridLines is a Boolean property used to enable or disable drawing of a 1-pixel grid line between rows and columns on the control. The default value for the property is False, and hides the grid lines. Changing the value for the property causes the widgetset class to be updated. @@ -12397,7 +13499,7 @@ end; OwnerData is a Boolean property which enables or disables virtual mode for the list view control.
- When set to True, the Items property does not contain the actual data displayed on the control. The display values are retrieved using the OnData, OnDataFind, and OnDataHint event handlers. Only the most recently accessed owner data item exists in the list view control. This allows the list view to be used to display a large number of items with a minimal amount of overhead. + When set to True, the Items property does not contain the actual data displayed on the control. The display values are retrieved using the OnData, OnDataFind, and OnDataHint event handlers. Only the most recently accessed owner data item exists in the list view control. This allows the list view to be used to display a large number of items with a minimal amount of overhead.
Set the value for the Count property in Items to indicate the number of owner data items available to the list view control. Assign a routine to OnData to populate an individual list item (and sub-items if needed) from the source for the owner data.
@@ -12430,10 +13532,36 @@ end;
+ RowSelect is a Boolean property which indicates whether all columns in the row are highlighted when the row is selected. The default value for RowSelect is False, and indicates that a single column/row value is displayed using the selected highlighting. RowSelect is used in report mode (ViewStyle = vsReport).
+
+ RowSelect is one of several properties represented as a TListViewProperty enumeration value (lvpRowSelect), and passed to the widgetset class in a TListViewProperties set type. Others properties represented in the set type include:
+
+ Changing the value for the property causes the widget to be notified of a change in the set when its handle has been allocated.
+
+ Use MultiSelect to enable multi-selection of rows and/or columns.
+
- The default value for the property is True in TCustomListView,
+ TabStop is a TabStop property which indicates if the control can be focused when using the Tab or Shift+Tab keys to navigate between controls on a form. TabStop is reintroduced in TCustomListView; the default value for the property is True. Changing the value for the property causes UpdateTabOrder to be called (in the ancestor class). A CM_TABSTOPCHANGED message is performed for the control.
+
+ TabStop is used in methods like FindNextControl, and may be updated in methods like Insert.
+ TopItem is a read-only TListItem property with the list item that appears at the top of the scrollable, non-fixed area on the control when ViewStyle is set to vsReport or vsList. TopItem contains Nil when ViewStyle is set to vsSmallIcon or vsIcon.
+
+ The property value is the TListItem entry in the Items container as reported by the widgetset class for the list view control.
+
+ ViewOrigin is a TPoint property with the left and top coordinates for the area currently displayed in the list view control. The TPoint value is provided by the widgetset class instance when its handle has been allocated. Otherwise, the cached value for ViewOrigin is returned. Changing the value for the property causes the widget to notified.
+
+ ViewOrigin is updated when the list view control is scrolled.
+
- ParentColor determines if the control should use the Color from the Parent control, when enabled. The default value for the property is False in TListView.
+ ParentColor determines if the control should use the Color from the Parent control, when enabled. The default value for the property is False in TListView.
When this property is True, all changes to the Color of the parent will also be applied to the Color of the control, ensuring that they both contain same value. If the Color of the control is changed by the application, then ParentColor will be automatically set to False.
+
+