SpreadJS Documentation
TouchToolStripItem Method
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.
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 : any,
   canExecute : any
) : 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