Implements an edit control used to filter an associated TListView control.

ListViewFilterEdit contains classes and types used to implement the TListViewFilterEdit control. It is used to filter the items displayed for an associated TListView control.

This file is part of the LazControls package.

Record type with data and lines of text for an item in a list view control.

TListViewDataItem is the typed maintained in TListViewDataList.

Pointer to the data for the list item.
Array of String values with the text displayed for the list item.
Implements the Equal (=) comparison operator for TListViewDataItem instances.

The return value is True when both the Data and the StringArray for the compared TListViewDataItem instances are the same.

True when the compared items have the same Data and StringArray values.
TListViewDataItem instance for the comparison operator.
TListViewDataItem instance for the comparison operator.
List container for TListViewDataItem instances.

TListViewDataList is a specialization of TFPGList to use TListViewDataItem instances in the container. TListViewDataList is the type used to implement the Items property in TListViewFilterEdit.

TFPGList
Implements a control used to filter an associated TListView control.
TListView control showing the filtered data.
Stores the value for the ByAllFields property.
Stores / restores the previous selections in the associated control.
Data supplied by the caller through the Items property.
Data sorted for viewing.
True when the list view item matches a filter condition for the control.
True when the list view item matches a filter condition for the control.
Sets the value for the FilteredListview property.
New value for the FilteredListview property.
Handles a notification message received when a component is added to or removed from the control.

Overridden in TListViewFilterEdit to ensure that the FilteredListview property is set to Nil when the component is removed from the control.

TControl.Notification
Component for the notification message.
Operation for the component.
Gets the ordinal position for the last selected list view item.

The return value is retrieved from the Index property in LastSelected (when assigned). The value is -1 if LastSelected has not been assigned.

TCustomListView.LastSelected
Ordinal position for the last selected list view item, or -1 when LastSelected has not been assigned.
Changes the selection for the associated list view control to the specified item position.
Ordinal position for the list item to select, multi-select, or de-select.
True if the item is selected or included in a multi-selection.
Moves the list view control to the next list item.

MoveNext is an overridden method in TListViewFilterEdit used to position the associated list view control on the next list item which matches the filter condition. The value in LastSelected is used as the starting point for the navigation request.

MoveNext calls the MoveTo method to reposition the list view and determine the existing selected state for the list item.

ASelect indicates whether the list item is included in the Selection (multi-selection) for the list view control.

No actions are performed in the method when FilteredListview has not been assigned, or does not contain any list items.

TCustomControlFilterEdit.MoveNext
True if the new list item should become selected, or added to the multi-selection for the list view control.
Moves the associated list view control to the previous list item.
True if the list item should be become selected (or multi-selected).
Moves the associated list view control towards the start of its list items by the number of visible rows for the control.
True if the list item should be become selected (or multi-selected).
Moves the associated list view control towards the end of its list items by the number of visible rows for the control.
True if the list item should be become selected (or multi-selected).
Move the associated list view control to the first list item.
True if the list item should be become selected (or multi-selected).
Move the associated list view control to the last list item.
True if the list item should be become selected (or multi-selected).
Returns True if a Return or Enter key press was forwarded to the list view control.
True if a Return (Enter) key press was forwarded to the list view control.
Sorts the data in the associated control and applies the filter.

SortAndFilter is an overridden method in TListViewFilterEdit which implements the abstract virtual method from the ancestor class. It discards previous filtering results and re-evaluates the filter condition(s) for each of the list items in FilteredListview.

TCustomControlFilterEdit.SortAndFilter TCustomControlFilterEdit.DoFilterItem TCustomControlFilterEdit.OnFilterItem TCustomControlFilterEdit.OnFilterItemEx
Implements the method used to apply filter data to the associated control.

Called when the ApplyFilter method in the ancestor class is executed.

Gets the default resource name for the button glyph on the control.
Resource name for the button glyph.
Constructor for the class instance.

Create is the overridden constructor for the class instance, and calls the inherited method on entry. It allocates resources for the SelectionList and Items properties. It creates an internal TListViewDataList instance used to store the filtered data for the list view control.

Owner of the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance. It frees resources allocated to SelectionList, Items, and the internal filtered data list. It calls the inherited method prior to exit.

Clears the selection list for the control and stores any list items from FilteredListview with their Selected property set to True.
Restores the Selected property for list items in FilteredListview to the values captured in StoreSelection.
Selected items restored after filtering.

The list of selected items in the list view control. They are restored after filtering is applied.

Maintains the data which is filtered and shown in the ListView.
The associated TListView for the filter edit control.
Indicates if all fields are compared using the filter.

When set to True, all fields in the list view data areused when searching for a value that matches the filter. Otherwise, only the first field is used. The default value for the property is False.

ByAllFields is used when SortAndFilter is called to select and order the filtered data for the control.