| FarPoint.Web.Spread 名前空間 > TextCellType クラス : CssClass プロパティ |
これはCSS(カスケードスタイルシート)クラスの名前です。
このプロパティを設定したセル型をセルに適用すると、そのセルのCSSクラス名としてCssClassプロパティが出力され、すべてのスタイル設定がインラインスタイルとして出力されます。したがって、このプロパティを使用する場合は、該当するセルから他のカスタムスタイル設定をすべて除去する方が適切です。
規格に厳密に準拠した最良の結果を得るには、CSSクラスをheadタグの外側の、Spread HTMLコードの後に配置します。
<style>.CssStyle1 { FONT: 700 12pt verdana; COLOR: yellow }
</style>
FarPoint.Web.Spread.TextCellType t = new FarPoint.Web.Spread.TextCellType();
t.CssClass = "CssStyle1";
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = t;
FpSpread1.ActiveSheetView.SetText(0, 0, "I'm yellow");
<style>.CssStyle1 { FONT: 700 12pt verdana; COLOR: yellow }
</style>
Dim t As New FarPoint.Web.Spread.TextCellType
t.CssClass = "CssStyle1"
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = t
FpSpread1.ActiveSheetView.SetText(0, 0, "I'm yellow")