• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language Pascal
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[FireMonkey] Modern ListView - Colorizer, Vertical\Horizontal mode, Columns and other

HitCount

ModernListView (Berlin, Tokyo [with fix], Rio)

Modern ListView - Colorizer, Vertical\Horizontal mode, Columns and other

Colorizer

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

horizontal mode

  • ListView1.Horizontal := true;

Columns Mode (only vertical)

colorizer

  • 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