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