Skip to main content
A newer version of this page is available. .

TcxCustomListView Class

Serves as a base class for classes representing list view controls.

Declaration

TcxCustomListView = class(
    TcxListViewContainer
)

Remarks

The TcxCustomListView class implements the functionality of the list view control, which can display a list of items in various modes.

The following screenshot demonstrates an example of the list view control appearance:

Please refer to the Items property description for details on how to create the items structure.

Items of TcxCustomListView descendant controls are represented by TListItem objects. Visually, items are comprised of text labels and images. If such item representation doesn’t suit your application needs, you can paint items manually by handling the OnCustomDrawItem and OnAdvancedCustomDrawItem events. Additionally you can create your own TListItem class descendant to represent items within the control. You must handle the OnCreateItemClass event to perform the replacement.

In addition to painting individual items, you can paint the entire list view control manually. This can be performed by handling the OnCustomDraw and OnAdvancedCustomDraw events.

The TcxListView control has three image lists containing images associated with the items. The LargeImages and SmallImages properties contain images helping to understand the item contents. The StateImages property contains images representing item states.

Two more significant features implemented by the TcxCustomListView class are multi selection of items and item sorting. Please refer to the MultiSelect and SortType property descriptions for details.

Do not create instances of TcxCustomListView. Use it as a base class when implementing custom list views with some extra features and advanced functionality. If you need a list view control on your form, use the derived TcxListView, which publishes properties of the TcxCustomListView class.

See Also