SpreadJS 13
GC.Spread.Sheets Namespace / Touch type / TouchToolStripItem Method
The name of the item.
The item text.
The item image source.
Defines the executive function that occurs when the user taps the item.
Defines when to show the item by a function. If returns true, display the item; otherwise, hide the item.
In This Topic
    TouchToolStripItem Method
    In This Topic
    Represents an item in the toolbar.
    Syntax
    var value; // Type: any
    value = GC.Spread.Sheets.Touch.TouchToolStripItem(name, text, image, command, canExecute);
    function TouchToolStripItem( 
       name : string,
       text : string,
       image : string,
       command : Object,
       canExecute : Object
    ) : any;

    Parameters

    name
    The name of the item.
    text
    The item text.
    image
    The item image source.
    command
    Defines the executive function that occurs when the user taps the item.
    canExecute
    Defines when to show the item by a function. If returns true, display the item; otherwise, hide the item.
    Example
    //This example adds a delete image with red text.
    spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
    spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
    spread.touchToolStrip.add(new GC.Spread.Sheets.Touch.TouchToolStripSeparator());
    See Also

    Reference

    Touch type