RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!
Delphi

Using TImageList with TListView in RAD Studio 10.1 Berlin

 

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!’] 

 


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.
Related posts
DelphiRAD Studio

Learn To Add Custom Text Rendering And Formatting Capabilities To Your Delphi FMX Controls Quickly

CodeDelphiRAD Studio

Quickly Learn How To Optimize Your Delphi Apps With ProDelphi In This CodeRage Replay

DelphiShowcase

Easy-to-use Orbit Simulator Built In Delphi FireMonkey For Learning Gravitational Physics

DelphiShowcase

Powerful Cross Platform Multitrack Music Recording Software Built In Delphi FireMonkey

Leave a Reply

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

IN THE ARTICLES