In Spread.Sheets, you can add a floating object to the sheet. The floating object is displayed on the top of the cells.
There are two kinds of floating objects: FloatingObject and Picture.
To add a FloatingObject to the sheet, you need to create a FloatingObject object and use the add method to add it to the sheet. For example:
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1');
var div = document.createElement('div');
div.innerHTML = '<span>Spread.Sheets supports FloatingObject</span>' +
'<div style='border: 1px dotted red; width: 80%; margin:auto;'>' +
'<ul><li>I am list one.</li><li>I am list two.</li><li>I am list three.</li></ul></div>';
After you add the custom floating object, you might want to work with it. Use the get method to get it by name, or use the all method to get all the FloatingObject objects. When you do not need it, you can use the remove method to remove it by name.
If you want to add a Picture to the sheet, you can use the add method. For example:
sheet.pictures.add('f2', 'images/splogo.png', 62, 140, 180, 200);
var pic = sheet.pictures.get('f2');
After you add the picture, you might want to work with it. Use the get method to get it by name or use the all method to get all the Picture objects. When you do not need it, you can use the remove method to remove it by name.
Both FloatingObject and Picture are floating objects. They are floated on the top of cells, but if there is a floating object that is on top of another one, you might want to put the lower one on top of the upper one. Use the zIndex method to set the z-index of the floating object. For example: