CImageView:GetProcessSet CImageView:Last

CImageView:Insert


The Insert method inserts a CImage into the list of images in a CImageView. The image is inserted before the specified index.

Syntax

bResult = CImageView:Insert( CImage, nIndex )

Remarks

The CImageView refers to a Mira image display window. The Image window uses an image set to display multiple images. This method inserts the CImage into the image set before the specified index. For example,nIndex=1 inserts the CImage before the first member of the image set.

This method fails if nIndex is out of bounds.

Example

Assume that a CImageView exists and is assigned toV. The following script fragment inserts an image intoV at index 3 (that is, before the image at index 3):

 

I = CImage:new()

-- create a CImage

local sPath, bOk = GetFileName()

-- use the Open dialog to get a filename

I:Open(sPath)

-- load the image from a file named sPath

bOk = V:Insert( I, 3 )

-- insert the CImage before image 3

Related Topics

CImageView, Display, Append, CImage