CImageView:Insert
The Insert method inserts a CImage into the list of images in a CImageView. The image is inserted before the specified index.
bResult = CImageView:Insert( CImage, nIndex ) |
CImage is the image to insert.
nIndex is the index of the insertion point, in the range 1 to Count.
On success, this method returns true.
On failure, this method returns 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.
The following script attaches an image window from the desktop and inserts an image the image set at index 3 (that is, before the image at index 3). In this example, the window initially contains 4 images:
-- suppose CImage I exists |
|
|
-- attach an image window from the desktop |
|
-- result: image count = 4 |
|
-- create a CImage |
|
-- insert the CImage before image 3 |
|
-- break out of the for loop if too few images |
|
|
|
-- result: image count = 5 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.