DataGridViewColumn.DividerWidth 속성

정의

열 구분선의 너비(픽셀)를 가져오거나 설정합니다.

public:
 property int DividerWidth { int get(); void set(int value); };
public int DividerWidth { get; set; }
member this.DividerWidth : int with get, set
Public Property DividerWidth As Integer

속성 값

Int32

구분선(열의 오른쪽 여백)의 두께(픽셀)입니다.

예제

다음 코드 예제에서는 세 번째 열 뒤에 세로 가장자리를 추가합니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataGridViewColumn 클래스입니다.

// Set the vertical edge.
void Button7_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   int thirdColumn = 2;
   
   //        int edgeThickness = 5;
   DataGridViewColumn^ column = dataGridView->Columns[ thirdColumn ];
   column->DividerWidth = 10;
}
// Set the vertical edge.
private void Button7_Click(object sender,
    System.EventArgs e)
{
    int thirdColumn = 2;
    DataGridViewColumn column =
        dataGridView.Columns[thirdColumn];
    column.DividerWidth = 10;
}
' Set the vertical edge.
Private Sub Button7_Click(ByVal sender As Object, _
    ByVal e As System.EventArgs) Handles Button7.Click

    Dim thirdColumn As Integer = 2
    Dim column As DataGridViewColumn = _
        dataGridView.Columns(thirdColumn)
    column.DividerWidth = 10

End Sub

설명

이 속성은 고정된 열과 스크롤할 수 있는 열 간의 시각적 경계를 제공하는 데 유용합니다. 추가 가장자리는 연결된 DataGridView열의 전경색을 사용하지만 현재 열의 일부입니다. 추가 가장자리는 사용자가 두 번 클릭하여 열 크기를 자동으로 조정할 수 있는 영역을 확장하지 않습니다. 열의 크기를 조정하려면 사용자가 구분선과 인접 열 사이의 경계를 두 번 클릭해야 합니다.

적용 대상

추가 정보