SpreadJS Documentation
fixedPosition Method
The value indicates whether the position of the floating object is fixed.
Gets or sets whether the position of the floating object is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.
Syntax
var instance = new GcSpread.Sheets.FloatingObject(name, x, y, width, height);
var returnValue; // Type: Object
returnValue = instance.fixedPosition(value);
function fixedPosition( 
   value : boolean
) : Object;

Parameters

value
The value indicates whether the position of the floating object is fixed.

Return Value

true if the position of the floating object is fixed; otherwise, false.
Example
This example sets the position of the object to fixed.
var customFloatingObject = new GcSpread.Sheets.CustomFloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.fixedPosition(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.Content(btn);
sheet.addFloatingObject(customFloatingObject);
Remarks
When the fixedPosition method of a floating object (Picture or CustomFloatingObject) is true, the floating object's position is not changed after scrolling, hiding, showing, resizing, or moving rows or columns. The dynamicMove and dynamicSize methods are disabled if the fixedPosition method is true. If the fixedPosition method is true, the floating object can be moved or resized.
See Also

Reference

FloatingObject class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.