setSelectedIndices()

Description

Sets the indices of all images currently selected by Dynamsoft Camera SDK. Press “Ctrl” key to enable multiple selection.

Syntax

ImageViewerObject.image.setSelectedIndices(iValue);

Parameters

<int[]> iValue: the value to set

Return value

bool

Remarks

The index is 0 based.

When an error occurs, check getErrorCode() or getErrorString() for error information.

Example

             var imageviewer = DCSObject.getImageViewer ("ImageViewerContainer");  // Get a specified image viewer
             var arr = [];
             for (var i = 0; i < imageviewer.image.getCount(); i ++) {
                 arr[i] = i;
             }
             imageviewer.image.setSelectedIndices(arr); //Select all the images in the buffer.
       

See also

.image.getSelectedIndices()
.image.getCount()