[]
        
(Showing Draft Content)

GC.Spread.Sheets.Touch.TouchToolStripItem

Class: TouchToolStripItem

Sheets.Touch.TouchToolStripItem

Table of contents

Constructors

Methods

Constructors

constructor

new TouchToolStripItem(name, text, image, command?, canExecute?)

Represents an item in the toolbar.

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());

Parameters

Name Type Description
name string The name of the item.
text string The item text.
image string The item image source.
command? any Defines the executive function that occurs when the user taps the item.
canExecute? Function Defines when to show the item by a function. If returns true, display the item; otherwise, hide the item.

Methods

font

font(value?): any

Gets or sets the font of the item text.

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());

Parameters

Name Type
value? string

Returns

any

If no value is set, returns the font of the item text; otherwise, returns the toolbar item.


foreColor

foreColor(value?): any

Gets or sets the color of the item text.

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());

Parameters

Name Type
value? string

Returns

any

If no value is set, returns the color of the item text; otherwise, returns the toolbar item.


image

image(value?): any

Gets or sets the source of the item image.

example

//This example adds a delete image with red text.
var tts = new GC.Spread.Sheets.Touch.TouchToolStripItem();
tts.image("cut.png");
tts.name("C");
tts.text("Delete");
spread.touchToolStrip.add(tts, function(){ });
spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");

Parameters

Name Type
value? string

Returns

any

If no value is set, returns the source of the item image; otherwise, returns the toolbar item.


name

name(value?): any

Gets or sets the name of the item.

example

//This example adds a delete image with red text.
var tts = new GC.Spread.Sheets.Touch.TouchToolStripItem();
tts.image("cut.png");
tts.name("C");
tts.text("Delete");
spread.touchToolStrip.add(tts, function(){ });
spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");

Parameters

Name Type
value? string

Returns

any

If no value is set, returns the name of the item; otherwise, returns the toolbar item.


text

text(value?): any

Gets or sets the text of the item.

example

//This example adds a delete image with red text.
var tts = new GC.Spread.Sheets.Touch.TouchToolStripItem();
tts.image("cut.png");
tts.name("C");
tts.text("Delete");
spread.touchToolStrip.add(tts, function(){ });
spread.touchToolStrip.getItem("C").font("15px Arial").foreColor("red");

Parameters

Name Type
value? string

Returns

any

If no value is set, returns the text of the item; otherwise, returns the toolbar item.