SpreadJS 13
GC.Spread.Sheets.Tables Namespace / TableStyle type / foreColor Field
In This Topic
    foreColor Field
    In This Topic
    Indicates the foreground color.
    Syntax
    var instance = new GC.Spread.Sheets.Tables.TableStyle(backColor,
                                                         foreColor,
                                                         font,
                                                         borderLeft,
                                                         borderTop,
                                                         borderRight,
                                                         borderBottom,
                                                         borderHorizontal,
                                                         borderVertical,
                                                         textDecoration);
    var value; // Type: string
    value = instance.foreColor;
    var foreColor : string;
    Example
    This example creates a table.
    var tableStyle = new GC.Spread.Sheets.Tables.TableTheme();
    var thinBorder = new GC.Spread.Sheets.LineBorder("black", GC.Spread.Sheets.LineStyle.dotted);
    tableStyle.wholeTableStyle(new GC.Spread.Sheets.Tables.TableStyle("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));
    
    var tStyleInfo = new GC.Spread.Sheets.Tables.TableStyle();
    tStyleInfo.backColor = "green";
    tStyleInfo.foreColor = "red";
    tStyleInfo.borderBottom = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
    tStyleInfo.borderLeft = new GC.Spread.Sheets.LineBorder("yellow", GC.Spread.Sheets.LineStyle.medium);
    tStyleInfo.borderTop = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
    tStyleInfo.borderRight = new GC.Spread.Sheets.LineBorder("green", GC.Spread.Sheets.LineStyle.thin);
    tStyleInfo.font = "bold 11pt arial";
    
    tableStyle.headerRowStyle(tStyleInfo);
    var table = activeSheet.tables.add("table1", 1, 1, 5, 5, tableStyle);
    See Also

    Reference

    TableStyle type