Spread.Sheets Documentation
remove Method
The name of the floating object.
Removes a floating object from the sheet by the indicate name.
Syntax
var instance = new GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection(sheet, typeName);
var value; // Type: any
value = instance.remove(name);
function remove( 
   name : string
) : any;

Parameters

name
The name of the floating object.
Example
The following examples use the remove method.
<input type="button" id="button1" value="button1"/>

var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("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.floatingObjects.add(customFloatingObject);

var customFloatingObject1 = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f2", 10, 80, 60, 64);
var btn1 = document.createElement('button');
btn1.style.width = "60px";
btn1.style.height = "30px";
btn1.innerText = "button1";
customFloatingObject1.content(btn1);
activeSheet.floatingObjects.add(customFloatingObject1);

$("#button1").click(function () {
activeSheet.resumePaint();
activeSheet.floatingObjects.remove("f2");
activeSheet.repaint();
    });
<input type="button" id="button1" value="button1"/>

activeSheet.pictures.add("f2","tsoutline.png",100,60,200,100);

$("#button1").click(function () {
activeSheet.resumePaint();
activeSheet.pictures.remove("f2");
activeSheet.repaint();
    });
See Also

Reference

FloatingObjectCollection type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.