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

Using TImageList with TListView in RAD Studio 10.1 Berlin

the future of starts demands massive productivity

 

If one of the classic appearances is used, the TListViewItem.ImageIndex property can be set. This is illustrated on the first Tab. Likewise, a LiveBindings link can be drawn directly to an Item.ImageIndex field for a similar effect.

When using a dynamic appearance, there can be more than one image and TListView performs no implicit actions on the items. It would be possible to hook up an OnUpdateObjects event and set the ImageIndex property of individual drawable objects. However, there is an easier way of doing that. When data members that correspond to TListItemImage objects are assigned an integer, it is interpreted as the ImageIndex. The second pair of tabs illustrates that.

 

 

You can access the demo by going to:

https://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Berlin/Object%20Pascal/Multi-Device%20Samples/User%20Interface/ListView/ListViewImageIndex/

 

[DownloadButton Product=’RAD’ Caption=’Try RAD Studio Berlin today!’]

In the next article, you’ll learn about the improvements of this compiler which include pair C++ and many more.

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

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

About author

Director of Product Management, Developer Tools Idera, Inc.

Leave a Reply

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

IN THE ARTICLES