SpreadJS Documentation
TableStyleInfo Constructor
The background color of the table.
The foreground color of the table.
The font.
The left border line of the table.
The top border line of the table.
The right border line of the table.
The bottom border line of the table.
The horizontal border line of the table.
The vertical border line of the table.
The text decoration of the table.
Represents table style information.
Syntax
var instance = new GcSpread.Sheets.TableStyleInfo(backColor,
                                                 foreColor,
                                                 font,
                                                 borderLeft,
                                                 borderTop,
                                                 borderRight,
                                                 borderBottom,
                                                 borderHorizontal,
                                                 borderVertical,
                                                 textDecoration);
function TableStyleInfo( 
   backColor : string,
   foreColor : string,
   font : string,
   borderLeft : LineBorder,
   borderTop : LineBorder,
   borderRight : LineBorder,
   borderBottom : LineBorder,
   borderHorizontal : LineBorder,
   borderVertical : LineBorder,
   textDecoration : GcSpread.Sheets.TextDecoration
) : TableStyleInfo;

Parameters

backColor
The background color of the table.
foreColor
The foreground color of the table.
font
The font.
borderLeft
The left border line of the table.
borderTop
The top border line of the table.
borderRight
The right border line of the table.
borderBottom
The bottom border line of the table.
borderHorizontal
The horizontal border line of the table.
borderVertical
The vertical border line of the table.
textDecoration
The text decoration of the table.
Example
This example creates a table.
var tableStyle = new GcSpread.Sheets.TableStyle();
var thinBorder = new GcSpread.Sheets.LineBorder("black", GcSpread.Sheets.LineStyle.dotted);
tableStyle.wholeTableStyle(new GcSpread.Sheets.TableStyleInfo("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));

var tableStyleInfo = new GcSpread.Sheets.TableStyleInfo(
    "black",
    "white",
    "bold 11pt arial",
    new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin),
    new GcSpread.Sheets.LineBorder("red", GcSpread.Sheets.LineStyle.thick),
    new GcSpread.Sheets.LineBorder("yellow", GcSpread.Sheets.LineStyle.thin),
    new GcSpread.Sheets.LineBorder("blue", GcSpread.Sheets.LineStyle.thick));
tableStyle.headerRowStyle(tableStyleInfo);

var table = activeSheet.addTable("table1", 1, 1, 5, 5, tableStyle);
See Also

Reference

TableStyleInfo type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.