MESCIUS 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>

 

 


© MESCIUS inc. All rights reserved.