■ 셀 스타일을 설정하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
FarPoint.Win.Spread.NamedStyle parentNamedStyle1 = new FarPoint.Win.Spread.NamedStyle("ParentStyle"); parentNamedStyle1.BackColor = Color.Blue; FarPoint.Win.Spread.NamedStyle childNamedStyle1 = new FarPoint.Win.Spread.NamedStyle("ChildStyle1", "ParentStyle"); childNamedStyle1.ForeColor = Color.Orange; FarPoint.Win.Spread.NamedStyle childNamedStyle2 = new FarPoint.Win.Spread.NamedStyle("ChildStyle2", "ParentStyle"); childNamedStyle2.ForeColor = Color.Yellow; fpSpread1.NamedStyles.Add(parentNamedStyle1); fpSpread1.NamedStyles.Add(childNamedStyle1); fpSpread1.NamedStyles.Add(childNamedStyle2); fpSpread1.ActiveSheet.Cells[0, 0, 4, 0].StyleName = "ChildStyle1"; fpSpread1.ActiveSheet.Cells[0, 1, 4, 1].StyleName = "ChildStyle2"; |