TListView
│
English (en) │
français (fr) │
polski (pl) │
русский (ru) │
TListView is a visible component on the Common Controls tab of the Component Palette that provides a list view of its associated Items. Items can be represented by an icon from each of the associated TImageLists: SmallImages, LargeImages and StateImages.
Notes
- GetNextItem() requires StartItem to be provided. This is incompatible with Delphi's GetNextItem(), where startItem is allowed to be nil, which will perform the search from the relative (direction driven) start.
Sorting
Sorting is (typically?) applied when using vsReport ViewStyle. Sorting might be a time consuming process or a larger data scale (when comparison of items takes a considerable time).
SortType is the key property in order to perform any sorting in TListView.
- stNone - (the default value) that no sorting should be for the control.
Typically the sorting can be requested by a user. Whenever a user clicks on a column header, that requires to either sort (initially ascendancy) or to switch to the opposite sorting order (either from ascendant to descendant, or back). It's not a rule, but a common expectation. For some data sets selecting sorting might not make any sense. AutoSort (default value is true)the property of TListview controls, if the listview should be sorted automatically, as soon as user clicks on a column header. AutoSort will have no effect, while SortType is set to stNone.
AlphaSort is a convenience method, that changes the settings to ascending sort (SortDirection=sdAscending) based on the text (SortType=stText) of the first column (SortColumn=0). Note that the actual properties are changed.
See also