Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
Delphi

Discover The Powerful Custom ModernListView Library For Cross-Platform Development in Delphi FireMonkey

The website www.fmxexpress.com has an article with some really detailed information about the ModernListView Library. Lets check what they are saying.

“Developer rzaripov1990 has a custom ListView component over on Github for Firemonkey in Delphi 10 Berlin. The ListView is the central component for every mobile application, and as a developer you should always choose the one that can be heavily customizable and very easy to use/implement. This modern ListView component is available for Delphi 10 Berlin with FireMonkey on Android, IOS, OSX, and Windows”.

What are the features of the ModernListView Library?

One nice feature is that it has both horizontal and vertical mode. Thus, using

enables the list to display the cells (items) in a horizontal perspective, while

displays the items vertically. If you are an artist when designing your look and feel of the application, this component can customize every graphic aspect such with available events such as: SetColorItemSelected, SetColorItemFill, SetColorBackground, SetColorItemSeparator, SetColorText, SetColorTextSelected, SetColorTextDetail, SetColorHeader, SetColorTextHeader, and many other properties.

The properties are self-explanatory, no need to cover them here. With the AutoColumns and ColumnWidth properties, the component will automatically calculate the best fit appearance and position for the items when populating the list (very useful when dealing with large number of items).

Apart form the standard behavior events, you have OnColumnClick listener for the ListView. You also have the option to hide/show the scroll bars (ListView.ShowScrollBar), set indent for items separators (ListView.SeparatorLeftOffset and ListView.SeparatorRightOffset).

How much does the ModernListView Library cost?

The component is free and has some nice demos with it as well. For the moment it is available only for Delphi Berlin using FireMonkey, very useful too if you build multi-device applications.

ModernListView Library IDE screenshot

Using ModernListView Library

Let’s get a better view of what is this all about. We will now go through some of the components, their design and what they do.

ModernListView Library colorizer screenshot

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

Horizontal Mode

ModernListView Library alignment modes screenshot
  • ListView1.Horizontal := true;

Columns Mode (only vertical)

ModernListView Library columns mode
  • ListView1.ColumnWidth := 160;
  • ListView1.AutoColumns := true;

Events

event for AutoColumn mode

called when end of list

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

The list is long, so if you want to see all of it and try the library, just go to Github, download and test this package: https://github.com/rzaripov1990/ModernListView

Note that the screen shots and some of the text in this article are drawn from the above GitHub repository.


What's New for RAD Studio 11

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts
CodeDelphi

5 Ways To Improve Your Code: What You Need To Know

DelphiDeveloper InterviewsInterviewNews

What Is It Like To Be A Developer Dalija Prasnikar?

DelphiRAD Studio

This Is How To Modernize Your Apps On Time And Under Budget

DelphiNewsRAD Studio

Delphi Best Practices For A New Project In 2021 And Beyond

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES