SpreadJS Documentation
setFloatingObjectZIndex Method
The name of the floating object.
The z-index.
Sets the z-index of the floating object.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: any
value = instance.setFloatingObjectZIndex(name, zIndex);
function setFloatingObjectZIndex( 
   name : string,
   zIndex : number
) : any;

Parameters

name
The name of the floating object.
zIndex
The z-index.
Example
This example uses the setFloatingObjectZIndex 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);
activeSheet.setFloatingObjectZIndex("f2", 897);
activeSheet.setFloatingObjectZIndex("f1", 898);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.