ImageEn, unit iemview

TImageEnMView.MultiSelectedImages

TImageEnMView.MultiSelectedImages


Declaration


property MultiSelectedImages[index: Integer]: Integer;


Description


Returns the index of all selected images, where MultiSelectedImages[0] returns the index of the first selected image, MultiSelectedImages[1] returns the second, etc.

Notes:
- Use MultiSelectedImagesCount to know how many images are selected
- Items will be returned by MultiSelectedImages in index order.
- This property is valid even if multiple selection is not enabled (i.e. returning SelectedImage).


Example 1


// replaces all selected images with 'new.jpg'
for i := 0 to ImageEnMView1.MultiSelectedImagesCount - 1 do
begin
  iSelIndex := ImageEnMView1.MultiSelectedImages[ i ];
  ImageEnMView1.SetImageFromFile(iSelIndex , 'new.jpg');
end;


Example 2


// Get filenames of all selected files
lbxFilenames.clear;
for i := 0 to ImageEnMView1.MultiSelectedImagesCount - 1 do
begin
  iSelIndex := ImageEnMView1.MultiSelectedImages[ i ];
  lbxFilenames.Items.Add(ImageEnMView1.ImageFileName[iSelIndex]);
end;


Compatibility Information


Prior to v8.0.0, MultiSelectedImages returned images in the order they were selected. To restore this functionality, call:

ImageEnMView1.MultiSelectedImagesAutoSort := False;
for i := 0 to ImageEnMView1.MultiSelectedImagesCount - 1 do...


See Also


- MultiSelectedImagesCount
- IsSelected