Spread.Sheets
foreColor フィールド
GC.Spread.Sheets 名前空間 > Style クラス : foreColor フィールド
前景色を示します。
シンタックス
var instance = new GC.Spread.Sheets.Style(backColor,
                                         foreColor,
                                         hAlign,
                                         vAlign,
                                         font,
                                         themeFont,
                                         formatter,
                                         borderLeft,
                                         borderTop,
                                         borderRight,
                                         borderBottom,
                                         diagonalDown,
                                         diagonalUp,
                                         locked,
                                         textIndent,
                                         wordWrap,
                                         shrinkToFit,
                                         backgroundImage,
                                         cellType,
                                         backgroundImageLayout,
                                         tabStop,
                                         textDecoration,
                                         imeMode,
                                         name,
                                         parentName,
                                         watermark,
                                         cellPadding,
                                         labelOptions);
var value; // Type: string
value = instance.foreColor;
var foreColor : string;
使用例
次のサンプルコードは、foreColorプロパティを設定します。
// 次のサンプルコードは、foreColorプロパティを設定します。 activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]); var style = new GC.Spread.Sheets.Style(); style.backColor = "red"; style.foreColor = "black"; var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(); cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule); cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan); cell.value1(5); cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]); cell.style(style); activeSheet.conditionalFormats.addRule(cell); var style1 = new GC.Spread.Sheets.Style(); style1.foreColor = "red"; var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(); top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule); top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top); top.rank(3); top.style(style1); top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]); top.stopIfTrue(true); activeSheet.conditionalFormats.addRule(top);
activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
style.foreColor = "black";
var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule);
cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan);
cell.value1(5);
cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
cell.style(style);
activeSheet.conditionalFormats.addRule(cell);

var style1 = new GC.Spread.Sheets.Style();
style1.foreColor = "red";
var top = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule();
top.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.top10Rule);
top.type(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.top);
top.rank(3);
top.style(style1);
top.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
top.stopIfTrue(true);
activeSheet.conditionalFormats.addRule(top);
関連トピック

参照

Style クラス