SpreadJS 13
GC.Spread.Sheets.StatusBar Namespace / StatusItem type / onCreateItemView Method
In This Topic
    onCreateItemView Method
    In This Topic
    Create the item element on statusbar. Can override for customize item.
    Syntax
    var instance = new GC.Spread.Sheets.StatusBar.StatusItem(name,
                                                            options,
                                                            options.menuContent,
                                                            options.align,
                                                            options.tipText,
                                                            options.visible,
                                                            options.showStatusInContexMenu,
                                                            options.value);
    var value; // Type: any
    value = instance.onCreateItemView(container);
    function onCreateItemView( 
       container : HTMLElement
    ) : any;

    Parameters

    container
    Example
    let StatusItem = GC.Spread.Sheets.StatusBar.StatusItem;
    function LabelItem (name, options) {
      StatusItem.call(this, name, options);
    }
    LabelItem.prototype = new StatusItem();
    LabelItem.prototype.onCreateItemView = function (container) {
      let item = document.createElement('div');
      item.innerText = this.value;
      container.appendChild(item);
      // add event listener for container
    }
    statusBar.add(new LabelItem('labelItem', {menuContent: 'label', value: 'options test'}));
    See Also

    Reference

    StatusItem type