CImageView:Remove


The Remove method removes a CImage from the CImageView and frees memory associated with the image.

Syntax

bResult = CImageView:Remove( nIndex )

bullet.gif    nIndex is the index of the deletion point, in the range 1 to Count.

bullet.gif    On successful deletion, this method returns true.

bullet.gif    On failure, this method returns false.

Remarks

The CImageView refers to a Mira image display window. The Image window uses an image set to display multiple images. This command removes the specified image from the image set and deletes the image from memory.

This method fails if you attempt to remove the only image or ifnIndex is out of bounds.

Example

Suppose a CImageView exists and is assigned toV, and its window contains more than 3 images. The following script removes the image at index 3:

bOK = V:Remove( 3 )

-- delete the image at index 3

if not bOK then

 

  Printf("Cannot delete at index %d", 3 )

 

end

 

Related Topics

CImageView, Display, CImage class


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.