SPREAD for ASP.NET 10.0J サンプルコード集 > セル型 > ハイパーリンク型セル > 文字の色を変更する |
ハイパーリンク型セルのCssClassプロパティにスタイルシートを設定します。
HyperLinkCellType hp = new HyperLinkCellType() { NavigateUrl = "http://www.grapecity.com/tools/", CssClass= "mylink" }; FpSpread1.Cells[0, 1].CellType = hp;
Dim hp As New HyperLinkCellType() With { .NavigateUrl = "http://www.grapecity.com/tools/", .CssClass= "mylink" } FpSpread1.Cells(0, 1).CellType = hp
<!--スタイルシートでリンク先を未訪問/訪問済みの文字色、マウスポインターをハイパーリンク上に移動時の背景色を設定します--> <style type="text/css"> .mylink a:link{color:blue;} .mylink a:visited{color:lightblue} .mylink a:hover{background-color:antiquewhite} </style>