SpreadJS Documentation
removeFloatingObject Method
The name of the custom floating object to remove.
Removes the custom floating object with the specified name.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: any
value = instance.removeFloatingObject(name);
function removeFloatingObject( 
   name : string
) : any;

Parameters

name
The name of the custom floating object to remove.
Example
This example removes a floating object when clicking the button.
<input type="button" id="button1" value="button1"/>

var customFloatingObject = new GcSpread.Sheets.CustomFloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isSelected(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.Content(btn);
activeSheet.addFloatingObject(customFloatingObject);

var customFloatingObject1 = new GcSpread.Sheets.CustomFloatingObject("f2", 10, 100, 60, 40);
var btn1 = document.createElement('button');
btn1.style.width = "60px";
btn1.style.height = "30px";
btn1.innerText = "button";
customFloatingObject.Content(btn1);
activeSheet.addFloatingObject(customFloatingObject1);

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

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.