Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

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.

[crayon-6736a306d6209333457093/]

 

 

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.

Exit mobile version