When you select and tap the selection, a touch tool strip will pop up. This can provide extended functionality on mobile and touch devices that users might otherwise not have. In the SpreadJS instance below, try customizing the touch toolstrip by adding or removing items using the menu.
You can use the built-in tool strip items: Paste, Cut, Copy, and AutoFill.
You can also customize a touch tool strip item and add it to the touch tool strip.
var text = 'clear'
var image = 'image/clear.jpg';
var item = new GC.Spread.Sheets.Touch.TouchToolStripItem(name, text, image, function () {
spread.touchToolStrip.close();
alert('Runing clearing...');
});
spread.touchToolStrip.add(item);
You can use the text method to get and set the text of the item, use the font method to get and set the font of the item text, and use the foreColor method to get and set the color of the item text.
After you add the touch tool strip item, you can use getItem and getItems to get the items. Also, you can remove one or clear all the items.
var text = 'clear'
var image = 'image/clear.jpg';
var item = new GC.Spread.Sheets.Touch.TouchToolStripItem(name, text, image, function () {
spread.touchToolStrip.close();
alert('Runing clearing...');
});
spread.touchToolStrip.add(item);
You can customize the tool strip using the provided APIs. For example:
var toolStrip = spread.touchToolStrip;
toolStrip.imageAreaHeight(50); //Sets the image area height.
toolStrip.itemHeight(80); //Sets the toolbar item height.
toolStrip.itemWidth(120); //Sets the toolbar item width.
toolStrip.separatorHeight(80); //Sets the toolbar separator height.
spread.touchToolStrip.add(item);
Submit and view feedback for