ModernListView (Berlin, Tokyo [with fix], Rio)
Modern ListView - Colorizer, Vertical\Horizontal mode, Columns and other
Colorizer
- ListView1.SetColorItemSelected(TAlphaColorRec.Orangered);
- ListView1.SetColorItemFill(TAlphaColorRec.Whitesmoke);
- ListView1.SetColorItemFillAlt(TAlphaColorRec.Lightgrey);
- ListView1.SetColorBackground(TAlphaColorRec.Whitesmoke);
- ListView1.SetColorItemSeparator(TAlphaColorRec.Red);
- ListView1.SetColorText(TAlphaColorRec.Darkmagenta);
- ListView1.SetColorTextSelected(TAlphaColorRec.Blueviolet);
- ListView1.SetColorTextDetail(TAlphaColorRec.Darksalmon);
- ListView1.SetColorHeader(TAlphaColorRec.Crimson);
- ListView1.SetColorTextHeader(TAlphaColorRec.Whitesmoke);
- ListView1.SetColorTextHeaderShadow(TAlphaColorRec.grey);
- ListView1.SetColorPullRefresh(TAlphaColorRec.Lime);
- ListView1.SetColorPullRefreshIndicator(TAlphaColorRec.Limegreen);
- ListView1.SetColorStretchGlow(TAlphaColorRec.Limegreen);
set custom color for item
if ListView1.IsCustomColorUsed(ListView1.ItemIndex) then
ListView1.SetDefaultColorForItem(ListView1.ItemIndex)
else
ListView1.SetCustomColorForItem(ListView1.ItemIndex, TAlphaColorF.Create(random(255) / 255, random(255) / 255, random(255) / 255, random(255) / 255).ToAlphaColor);
Horizontal Mode
- ListView1.Horizontal := true;
Columns Mode (only vertical)
- ListView1.ColumnWidth := 160;
- ListView1.AutoColumns := true;
Events
event for AutoColumn mode
procedure OnColumnClick(const Column: Integer; const X, Y: Single; const AItem: TListViewItem; const DrawebleName: string);
called when end of list
procedure OnScrollEnd(Sender: TObject);
Methods
- Style for ListView Columns Mode
- ListView1.ShowScrollBar - hide/show scrollbar
- ListView1.ItemsClearTrue - correct delete items
- ListView1.OffsetTop - indent of the first element
- ListView1.OffsetBottom - indent of the last element
- ListView1.getFirstVisibleItemIndex - first visible ItemIndex
- ListView1.getVisibleCount - amount of visible items
- ListView1.getLastVisibleItemindex - first visible ItemIndex + amount of visible items
- ListView1.SeparatorLeftOffset - indent for separator line
- ListView1.SeparatorRightOffset - indent for separator line
- ListView1.EnableTouchAnimation - enable/disable touch animation