DataGridViewLinkCell.TrackVisitedState 속성

정의

링크를 열어 볼 때 링크 색이 변경되는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool TrackVisitedState { bool get(); void set(bool value); };
public bool TrackVisitedState { get; set; }
member this.TrackVisitedState : bool with get, set
Public Property TrackVisitedState As Boolean

속성 값

Boolean

링크를 선택할 때 링크 색이 변경되면 true이고, 그렇지 않으면 false입니다. 기본값은 true입니다.

예제

다음 코드 예제에서는 DataGridViewLinkColumn.TrackVisitedState 속성을이 속성에 비슷합니다. 이 예제는에서 사용할 수 있는 보다 큰 예제의 일부는 DataGridViewComboBoxColumn 클래스 개요 항목입니다.

private:
    void AddLinkColumn()
    {
        DataGridViewLinkColumn^ links = gcnew DataGridViewLinkColumn();

        links->UseColumnTextForLinkValue = true;
        links->HeaderText = ColumnName::ReportsTo.ToString();
        links->DataPropertyName = ColumnName::ReportsTo.ToString();
        links->ActiveLinkColor = Color::White;
        links->LinkBehavior = LinkBehavior::SystemDefault;
        links->LinkColor = Color::Blue;
        links->TrackVisitedState = true;
        links->VisitedLinkColor = Color::YellowGreen;

        DataGridView1->Columns->Add(links);
    }
private void AddLinkColumn()
{
    DataGridViewLinkColumn links = new DataGridViewLinkColumn();

    links.UseColumnTextForLinkValue = true;
    links.HeaderText = ColumnName.ReportsTo.ToString();
    links.DataPropertyName = ColumnName.ReportsTo.ToString();
    links.ActiveLinkColor = Color.White;
    links.LinkBehavior = LinkBehavior.SystemDefault;
    links.LinkColor = Color.Blue;
    links.TrackVisitedState = true;
    links.VisitedLinkColor = Color.YellowGreen;

    DataGridView1.Columns.Add(links);
}
Private Sub AddLinkColumn()

    Dim links As New DataGridViewLinkColumn()
    With links
        .UseColumnTextForLinkValue = True
        .HeaderText = ColumnName.ReportsTo.ToString()
        .DataPropertyName = ColumnName.ReportsTo.ToString()
        .ActiveLinkColor = Color.White
        .LinkBehavior = LinkBehavior.SystemDefault
        .LinkColor = Color.Blue
        .TrackVisitedState = True
        .VisitedLinkColor = Color.YellowGreen
    End With
    DataGridView1.Columns.Add(links)
End Sub

설명

LinkVisited 이 경우 false방문 시 속성이 자동으로 설정 true 되지 않습니다.

설정 합니다 TrackVisitedState 소유 열의 속성을 설정 합니다 TrackVisitedState 속성 새로 고침 및 열에 있는 모든 셀의 열을 표시 합니다. 열 값을 설정 하면 개별 셀에 대해 지정된 된 값을 재정의 하려면 셀 값을 설정 합니다.

적용 대상

추가 정보