Unit 'ListViewFilterEdit' Package
[Overview][Types][Classes][Index] [#lazcontrols]

TListViewFilterEdit

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a control used to filter list items in an associated TListView control.

Declaration

Source position: listviewfilteredit.pas line 40

type TListViewFilterEdit = class(TCustomControlFilterEdit)

protected

  procedure Notification(); override;

  

Handles a notification message received when a component is added to or removed from the control.

  function GetLastSelectedIndex;

  

Gets the ordinal position for the last selected list view item.

  procedure MoveTo();

  

Changes the selection for the associated list view control to the specified item position.

  procedure MoveNext(); override;

  

Moves the list view control to the next list item.

  procedure MovePrev(); override;

  

Moves the associated list view control to the previous list item.

  procedure MovePageUp(); override;

  

Moves the associated list view control towards the start of its list items by the number of visible rows for the control.

  procedure MovePageDown(); override;

  

Moves the associated list view control towards the end of its list items by the number of visible rows for the control.

  procedure MoveHome(); override;

  

Move the associated list view control to the first list item.

  procedure MoveEnd(); override;

  

Move the associated list view control to the last list item.

  function ReturnKeyHandled; override;

  

Returns True if a Return or Enter key press was forwarded to the list view control.

  procedure SortAndFilter; override;

  

Sorts the data in the associated control and applies the filter.

  procedure ApplyFilterCore; override;

  

Implements the method used to apply filter data to the associated control.

  function GetDefaultGlyphName; override;

  

Gets the default resource name for the button glyph on the control.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  procedure StoreSelection; override;

  

Clears the selection list for the control, and stores any list items from FilteredListview with their Selected property set to True.

  procedure RestoreSelection; override;

  

Restores the Selected property for list items in FilteredListview which are stored in StoreSelection.

  property SelectionList: TStringList; [r]

  

Identifies the selected items in the associated TListView control.

  property Items: TListViewDataList; [r]

  

Maintains the data which is filtered and shown in the ListView.

published

  property FilteredListview: TCustomListView; [rw]

  

The associated list view for the filtered edit control.

  property ByAllFields: Boolean; [rw]

  

Indicates whether all fields are compared using the filter.

end;

Inheritance

TListViewFilterEdit

  

Implements a control used to filter list items in an associated TListView control.

|

TCustomControlFilterEdit

|

TCustomEditButton

|

TCustomAbstractGroupedEdit

|

TCustomControl

|

TWinControl

|

TControl

|

TLCLComponent

|

TComponent

|

TPersistent,IUnknown,IInterfaceComponentReference

|

TObject,IFPObserved

Description

TListViewFilterEdit is a TCustomControlFilterEdit descendant which implements a control used to filter list item data from an associated TCustomListView control. It includes the FilteredListview property which provides the original list items and selections, and displays the filtered results. Overridden methods are provided to apply the filter and sort the list items for the associated list view control. The button on the edit control is used to clear the filter applied to the list items. Other overridden methods are provided to navigate between and select the filtered list items.

Remark: TListViewFilterEdit requires FilteredListview to have list items available in its Items property. This prevents use of virtual mode (when OwnerData is True) in the associated list view control.

See also

TCustomControlFilterEdit