フローティングオブジェクトをシートに追加します。引数には次の2つのモードがあります。パラメーターが1つの場合、それはGC.Spread.Sheets.FloatingObjects.FloatingObject型のフローティングオブジェクトを示します。パラメーターが6つの場合、それらは名前、ソース、x、y、幅、高さを示します。
次のサンプルコードは、シートにフローティングオブジェクトを追加します。
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
This example adds a floating picture.
<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();
});