ImageList-SetAt

Function Name dcl-ImageList-SetAt
Syntax   (dcl-ImageList-SetAt ImageList [as Image List] ImageIndex [as Integer] Filename [as String] {Width [as Long] Height [as Long]})
Return Type Integer (new or deleted image index on success, NIL on failure)

This function adds, replaces, or deletes the image at ImageIndex. The first image is always at index zero. When adding images, an ImageIndex of -1 appends the image to the end of the list. If Filename is NIL, the image is deleted. The optional Width and Height image dimensions may be specified when adding the first image to an empty image list. If image dimensions are specified, the first added image is scaled to the specified dimensions. Subsequent images are always scaled to the same dimensions as the first image. If the Width and Height values are specified for subsequent images, they must match the image list image size or the function will fail.