Spread.Sheets
zIndex メソッド
GC.Spread.Sheets.FloatingObjects 名前空間 > FloatingObjectCollection タイプ : zIndex メソッド
floatingObjectの名前。
フローティングオブジェクトのzインデックス。
フローティングオブジェクトのzインデックスを取得または設定します。
シンタックス
var instance = new GC.Spread.Sheets.FloatingObjects.FloatingObjectCollection(sheet, typeName);
var value; // Type: any

// パラメータ
var name; //タイプ: string
var zIndex; //タイプ: number

value = instance.zIndex(name, zIndex);
function zIndex( 
   name : string,
   zIndex : number
) : any;

パラメータ

name
floatingObjectの名前。
zIndex
フローティングオブジェクトのzインデックス。
使用例
次のサンプルコードは、zIndexメソッドを使用します。
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("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.floatingObjects.add(customFloatingObject); var customFloatingObject1 = new GC.Spread.Sheets.FloatingObjects.FloatingObject("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.floatingObjects.add(customFloatingObject1); activeSheet.floatingObjects.zIndex("f2", 897); activeSheet.floatingObjects.zIndex("f1", 898);
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);
var customFloatingObject1 = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f2", 10, 30, 60, 64);
var btn1 = document.createElement('button');
btn1.style.width = "50px";
btn1.style.height = "20px";
btn1.innerText = "test";
customFloatingObject1.content(btn1);
activeSheet.floatingObjects.add(customFloatingObject1);
alert(activeSheet.floatingObjects.zIndex("f1"));
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("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.floatingObjects.add(customFloatingObject);
 
var customFloatingObject1 = new GC.Spread.Sheets.FloatingObjects.FloatingObject("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.floatingObjects.add(customFloatingObject1);
activeSheet.floatingObjects.zIndex("f2", 897);
activeSheet.floatingObjects.zIndex("f1", 898);
関連トピック

参照

FloatingObjectCollection タイプ