SpreadJS Documentation
addPicture Method
The name of the picture.
The image source of the picture.
The start row of the picture.
The start column of the picture.
The end row of the picture.
The end column of the picture.
The offset relative to the start row of the picture.
The offset relative to the start column of the picture.
The offset relative to the end row of the picture.
The offset relative to the end column of the picture.
Adds a picture to the sheet.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: Picture
value = instance.addPicture(name,
                            src,
                            startRow,
                            startColumn,
                            endRow,
                            endColumn,
                            startRowOffset,
                            startColumnOffset,
                            endRowOffset,
                            endColumnOffset);
function addPicture( 
   name : string,
   src : string,
   startRow : number,
   startColumn : number,
   endRow : number,
   endColumn : number,
   startRowOffset : number,
   startColumnOffset : number,
   endRowOffset : number,
   endColumnOffset : number
) : Picture;

Parameters

name
The name of the picture.
src
The image source of the picture.
startRow
The start row of the picture.
startColumn
The start column of the picture.
endRow
The end row of the picture.
endColumn
The end column of the picture.
startRowOffset
The offset relative to the start row of the picture.
startColumnOffset
The offset relative to the start column of the picture.
endRowOffset
The offset relative to the end row of the picture.
endColumnOffset
The offset relative to the end column of the picture.

Return Value

Returns the added picture.
Example
This example adds a floating picture.
<input type="button" id="button1" value="button1"/>

activeSheet.addPicture("f2","tsoutline.png",2,2,6,6);

$("#button1").click(function () {
activeSheet.isPaintSuspended(false);
activeSheet.removePicture("f2");
activeSheet.repaint();
    });
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.