CImageView:Remove
The Remove method removes a CImage from the CImageView and frees memory associated with the image.
bResult = CImageView:Remove( nIndex ) |
nIndex is the index of the deletion point, in the range 1 to Count.
On successful deletion, this method returns true.
On failure, this method returns false.
The CImageView wraps 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.
Suppose a CImageView exists, is assigned toV, and its window contains more than 3 images. The following script fragment removes the image at index 3:
bOK = V:Remove( 3 ) |
-- delete the image at index 3 |
if ( not bOK ) then |
|
Printf("Cannot delete at %d", 3 ) |
|
end |
|