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

Learn To Quickly Combine Images Into Lists With This Delphi And C++ Tutorial

This sample shows how to use FireMonkey image lists. In the Using TImageList Image Lists as Centralized Collections of Images tutorial, this example is used:

Location

You can find the ImageList sample project at:

Image Tab

Now click the first Image tab. This tab contains four types of the Next Image button. Each button shows the image. Click any of these buttons — check that the image containing the next index in the ImageList1 image list is drawn in each button. Note that in the Object Inspector, each button shows both Images and ImageIndex properties. Try to change the ImageIndex value.

Bitmap and Image Tab

In the Demo of images application, click the Bitmap and Image tab. This tab contains several controls managing images in the images list:

  1. The Right and Left arrows increase or decrease the index of the image being shown.
  2. The Up Cache Size and Down Cache Size buttons increase or decrease the CacheSize property on 1.
  3. The Clear Cache button to clear the internal cache.
  4. The Dormant check box sets or clears whether the actual image is stored with this bitmap item (the Dormant property).
  5. The Add New Source button creates a new image and adds it to the image list.
  6. The Update Text button demonstrates the drawing of a text over the current image.
  7. The Right and Left arrow buttons draw the next or previous image from the ImageList1 image list over the None caption of the None tab.

Bitmap Tab

Now click the first Bitmap tab. This tab contains three list controls: ComboBox1ListBox1, and TreeView1. These list controls show the Images property – in the Object Inspector – in which you can select an image list to use. Notice that each item control in these lists shows the ImageIndex property – in the Object Inspector – in which you can select a number (index) of an image in the image list. Try to change the ImageIndex value.

None Tab

Now click the last None tab. This tab contains the Add ItemsAdd Items with Bitmap, and Add Bitmap and Image buttons adding into the ListView2: TListView; list view a new item showing the Image1.Bitmap bitmap and/or images from the ImageList1 image list. The Clear Items button clears all items from the ListView2. The Images check box switches showing or hiding images from the ImageList1 image list.

You can check the original post via the link below:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FMX.ImageList_Sample

Head over and check out the full source code for the ImageList sample for Delphi on GitHub.

Check out the full C++ source code for the image list tutorial over on GitHub.

Next, find out how you can use your own implementation with list C++ views and Tools API support.

Exit mobile version