FarPoint.Web.Spread 名前空間 > AlternatingRow クラス : ForeColor プロパティ |
このプロパティの設定は、StyleNameプロパティを使用してセルに名前付きスタイルが割り当てられていて、その名前付きスタイルがテキスト色を設定する場合、オーバーライドできます。
セルの背景色を指定するには、BackColorプロパティを設定します。
FpSpread1.Sheets[0].AlternatingRows.Count = 3; FpSpread1.Sheets[0].Name = "Sheet1"; FpSpread1.Sheets[1].Name = "Sheet2"; FpSpread1.Sheets[0].ColumnCount = 5; FpSpread1.Sheets[1].ColumnCount = 5; FpSpread1.Sheets[0].RowCount = 10; FpSpread1.Sheets[1].RowCount = 10; FpSpread1.Sheets[0].AlternatingRows[0].BackColor = Color.Red; FpSpread1.Sheets[0].AlternatingRows[1].BackColor = Color.LightSkyBlue; FpSpread1.Sheets[0].AlternatingRows[2].BackColor = Color.LightGreen; FpSpread1.Sheets[1].AlternatingRows[0].BackColor = Color.Red; FpSpread1.Sheets[1].AlternatingRows[1].BackColor = Color.LightSkyBlue; FpSpread1.Sheets[0].AlternatingRows[1].ForeColor = Color.Red; FpSpread1.Sheets[1].AlternatingRows[1].ForeColor = Color.OrangeRed;
FpSpread1.Sheets(0).AlternatingRows.Count = 3 FpSpread1.Sheets(0).Name = "Sheet1" FpSpread1.Sheets(1).Name = "Sheet2" FpSpread1.Sheets(0).ColumnCount = 5 FpSpread1.Sheets(1).ColumnCount = 5 FpSpread1.Sheets(0).RowCount = 10 FpSpread1.Sheets(1).RowCount = 10 FpSpread1.Sheets(0).AlternatingRows(0).BackColor = Color.Red FpSpread1.Sheets(0).AlternatingRows(1).BackColor = Color.LightSkyBlue FpSpread1.Sheets(0).AlternatingRows(2).BackColor = Color.LightGreen FpSpread1.Sheets(1).AlternatingRows(0).BackColor = Color.Red FpSpread1.Sheets(1).AlternatingRows(1).BackColor = Color.LightSkyBlue FpSpread1.Sheets(0).AlternatingRows(1).ForeColor = Color.Red FpSpread1.Sheets(1).AlternatingRows(1).ForeColor = Color.OrangeRed