PowerTools MultiRow for Windows Forms 8.0J
VisitedLinkColor プロパティ
使用例 

すでに表示されたリンクの表示に使用する色を取得または設定します。
構文
Public Property VisitedLinkColor As Color
public Color VisitedLinkColor {get; set;}

プロパティ値

すでに表示されたリンクの表示に使用する色を表すSystem.Drawing.Color。既定値は、ユーザーのInternet Explorerで設定されている表示済みリンクの色です。
解説
MSDNのSystem.Windows.Forms.LinkLabelを参照してください。
使用例
次のサンプルコードは、リンクラベル型セルの動作または外観をカスタマイズする方法を示します。このサンプルコードは、LinkLabelCellクラスに示されている詳細なコード例の一部を抜粋したものです。
private LinkLabelCell CreateAddressLinkLabelCell()
{
    LinkLabelCell linkLabelCell = new LinkLabelCell();

    linkLabelCell.Selectable = false;

    linkLabelCell.Name = "Address";

    // Customize behavior of link label.
    linkLabelCell.LinkBehavior = LinkBehavior.HoverUnderline;

    // Customize colors when link label in different status.
    linkLabelCell.LinkColor = Color.Blue;

    linkLabelCell.ActiveLinkColor = Color.Red;

    linkLabelCell.VisitedLinkColor = Color.Purple;

    return linkLabelCell;
}

void gcMultiRow1_CellClick(object sender, CellEventArgs e)
{
    if (e.CellName == "Address")
    {
        object value = gcMultiRow1[e.RowIndex, e.CellIndex].Value;
        if (value != null)
        {
            Process.Start(value.ToString());
        }
    }
}
Private Function CreateAddressLinkLabelCell() As LinkLabelCell
    Dim linkLabelCell As New LinkLabelCell()

    linkLabelCell.Selectable = False

    linkLabelCell.Name = "Address"

    ' Customize behavior of link label.
    linkLabelCell.LinkBehavior = LinkBehavior.HoverUnderline

    ' Customize colors when link label in different status.
    linkLabelCell.LinkColor = Color.Blue

    linkLabelCell.ActiveLinkColor = Color.Red

    linkLabelCell.VisitedLinkColor = Color.Purple

    Return linkLabelCell
End Function

Private Sub gcMultiRow1_CellClick(ByVal sender As Object, ByVal e As CellEventArgs) Handles gcMultiRow1.CellClick
    If e.CellName = "Address" Then
        Dim value As Object = gcMultiRow1(e.RowIndex, e.CellIndex).Value
        If value <> Nothing Then
            Process.Start(value.ToString())
        End If
    End If
End Sub
参照

LinkLabelCell クラス
LinkLabelCell メンバ
ActiveLinkColor プロパティ
LinkColor プロパティ

 

 


© 2008-2015 GrapeCity inc. All rights reserved.