CImageView:Insert
The Insert method inserts a CImage into the list of images in a CImageView. The image is inserted before the specified index.
bSuccess = CImageView:Insert( CImage, nIndex ) where |
CImage is the image to insert.
nIndex is the index of the insertion point, in the range 1 to Count.
bSuccess is the returned success code. On success it is true, otherwise false.
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.
Assume that a CImageView exists and is assigned toV. The following script inserts an image intoV at index 3 (that is, before the image at index 3):
|
-- create a CImage |
|
-- use the Open dialog to get a filename |
|
-- load the image from a file named sPath |
|
-- insert the CImage before image 3 |