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. If you want the order they were selected, set MultiSelectedImagesAutoSort := False;
- This property is valid even if multiple selection is not enabled (i.e. returning SelectedImage).


Examples


// 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;

// 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;

// Access files in the order that user selects them
ImageEnMView1.MultiSelectedImagesAutoSort := False;
for i := 0 to ImageEnMView1.MultiSelectedImagesCount - 1 do...


See Also


- MultiSelectedImagesCount
- MultiSelectedImagesAutoSort
- MultiSelectedImagesList
- IsSelected