SpreadJS Documentation
add Method
GC.Spread.Sheets.StatusBar Namespace > StatusBar type : add Method
The instance of the child of StatusItem. The child extends from StatusItem.
The position is items index in all items array. Start from 0. Items display position is also related to align. If position is invalid or undefine, place it by default.
Add the item instance to the StatusBar.
Syntax
var instance = new GC.Spread.Sheets.StatusBar.StatusBar(host);
var value; // Type: boolean
value = instance.add(item, position);
function add( 
   item : StatusItem,
   position : number
) : boolean;

Parameters

item
The instance of the child of StatusItem. The child extends from StatusItem.
position
The position is items index in all items array. Start from 0. Items display position is also related to align. If position is invalid or undefine, place it by default.

Return Value

Add item result. Return true if add success, else failed.
Example
let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
let spanItem = new StatusItem('spanItemName', {menuContent: 'span', value: 'spanValue'});
let spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
let statusBar = new GC.Spread.Sheets.StatusBar.StatusBar(document.getElementById('statusBar'));
statusBar.bind(spread);
statusBar.add(spanItem);
See Also

Reference

StatusBar type