SpreadJS Documentation
foreColor Method
The color of the toolbar item text.
The color of the item text.
Syntax
var instance = new GcSpread.Sheets.TouchToolStripItem(name, text, image, command, canExecute);
var returnValue; // Type: any
returnValue = instance.foreColor(value);
function foreColor( 
   value : string
) : any;

Parameters

value
The color of the toolbar item text.

Return Value

If called without a parameter, returns the current item text font color; otherwise, returns the current item object.
Example
This example adds a delete image with red text.
<input type="button" id="button1" value="button1"/>

spread.touchToolStrip.add(new GcSpread.Sheets.TouchToolStripItem("Cut", "Delete", "cut.png", function(){ }))
spread.touchToolStrip.getItem("Cut").font("15px Arial").foreColor("red");
spread.touchToolStrip.add(new GcSpread.Sheets.TouchToolStripSeparator());

$("#button1").click(function () {
spread.touchToolStrip.remove("Cut");
activeSheet.isPaintSuspended(false);
activeSheet.repaint();
    });
See Also

Reference

TouchToolStripItem type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.