SpreadJS Documentation
getFloatingObjects Method
Gets the custom floating objects.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: Array
value = instance.getFloatingObjects();
function getFloatingObjects() : Array;

Return Value

The GcSpread.Sheets.CustomFloatingObject array of custom floating object instances.
Example
This example uses the getFloatingObjects method.
var customFloatingObject = new GcSpread.Sheets.CustomFloatingObject("f1", 20, 20, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button1";
customFloatingObject.Content(btn);
activeSheet.addFloatingObject(customFloatingObject);

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

var floating = activeSheet.getFloatingObjects();
for(var i = 0; i < floating.length; i++){
alert(floating[i].name());
}
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.