ImageEn, unit ievect

TImageEnVect.SelObjects

TImageEnVect.SelObjects


Declaration

property SelObjects[idx : integer]: integer; (Read-only)


Description

SelObjects returns the id (hobj) of idx-th selected object. The first selected object has an idx value of zero.

Returns -1 if there are no selected objects.


Example

// Sets pen color to clRed for all selected objects.
for i := 0 to ImageEnVect1.SelObjectsCount - 1 do
  ImageEnVect1.ObjPenColor[ ImageEnVect1.SelObjects[i] ] := clGreen;


Transition Information

If you are transitioning your code to TImageEnView Layers, instead of SelObjects, use: TIELayer.Selected.
Rather than iterating through selected layers, iterate through all layers and check whether the layer is selected, e.g.

for i := 0 to ImageEnView1.LayersCount - 1 do
  if ImageEnView1.Layers[i].Selected then...