DataGridView.AdjustColumnHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean) DataGridView.AdjustColumnHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean) DataGridView.AdjustColumnHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean) DataGridView.AdjustColumnHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean) Method

정의

현재 칠하고 있는 DataGridView의 열 머리글 셀에 대한 DataGridViewAdvancedBorderStyle을 조정합니다.Adjusts the DataGridViewAdvancedBorderStyle for a column header cell of a DataGridView that is currently being painted.

public:
 virtual System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ AdjustColumnHeaderBorderStyle(System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStyleInput, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStylePlaceholder, bool isFirstDisplayedColumn, bool isLastVisibleColumn);
public virtual System.Windows.Forms.DataGridViewAdvancedBorderStyle AdjustColumnHeaderBorderStyle (System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput, System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceholder, bool isFirstDisplayedColumn, bool isLastVisibleColumn);
abstract member AdjustColumnHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
override this.AdjustColumnHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
Public Overridable Function AdjustColumnHeaderBorderStyle (dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, dataGridViewAdvancedBorderStylePlaceholder As DataGridViewAdvancedBorderStyle, isFirstDisplayedColumn As Boolean, isLastVisibleColumn As Boolean) As DataGridViewAdvancedBorderStyle

매개 변수

dataGridViewAdvancedBorderStyleInput
DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

수정할 열 머리글 테두리 스타일을 나타내는 DataGridViewAdvancedBorderStyle입니다.A DataGridViewAdvancedBorderStyle that represents the column header border style to modify.

dataGridViewAdvancedBorderStylePlaceholder
DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

열 머리글 테두리 스타일에 대한 중간 변경 사항을 저장하는 데 사용되는 DataGridViewAdvancedBorderStyle입니다.A DataGridViewAdvancedBorderStyle that is used to store intermediate changes to the column header border style.

isFirstDisplayedColumn
Boolean Boolean Boolean Boolean

현재 칠하는 중인 DataGridViewCellDataGridView에 표시된 첫 번째 열에 있음을 나타내려면 true이고, 그렇지 않으면 false입니다.true to indicate that the DataGridViewCell that is currently being painted is in the first column displayed on the DataGridView; otherwise, false.

isLastVisibleColumn
Boolean Boolean Boolean Boolean

현재 칠하는 중인 DataGridViewCellVisible 속성이 true로 설정된 DataGridView의 마지막 열에 있음을 나타내려면 true이고, 그렇지 않으면 false입니다.true to indicate that the DataGridViewCell that is currently being painted is in the last column in the DataGridView that has the Visible property set to true; otherwise, false.

반환

현재 열 머리글의 테두리 스타일을 나타내는 DataGridViewAdvancedBorderStyle입니다.A DataGridViewAdvancedBorderStyle that represents the border style for the current column header.

예제

다음 코드 예제에서는 재정의 하는 방법에 설명 합니다 AdjustColumnHeaderBorderStyle 열 머리글 셀의 테두리를 사용자 지정 하는 방법입니다.The following code example demonstrates how to override the AdjustColumnHeaderBorderStyle method to customize the borders of the column header cells. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataGridViewAdvancedBorderStyle 클래스입니다.This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.

public override DataGridViewAdvancedBorderStyle AdjustColumnHeaderBorderStyle(
    DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput,
    DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceHolder,
    bool firstDisplayedColumn,
    bool lastVisibleColumn)
{
    // Customize the left border of the first column header and the
    // bottom border of all the column headers. Use the input style for 
    // all other borders.
    dataGridViewAdvancedBorderStylePlaceHolder.Left = firstDisplayedColumn ?
        DataGridViewAdvancedCellBorderStyle.OutsetDouble :
        DataGridViewAdvancedCellBorderStyle.None;
    dataGridViewAdvancedBorderStylePlaceHolder.Bottom =
        DataGridViewAdvancedCellBorderStyle.Single;

    dataGridViewAdvancedBorderStylePlaceHolder.Right =
        dataGridViewAdvancedBorderStyleInput.Right;
    dataGridViewAdvancedBorderStylePlaceHolder.Top =
        dataGridViewAdvancedBorderStyleInput.Top;

    return dataGridViewAdvancedBorderStylePlaceHolder;
}
    Public Overrides Function AdjustColumnHeaderBorderStyle( _
        ByVal dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, _
        ByVal dataGridViewAdvancedBorderStylePlaceHolder As DataGridViewAdvancedBorderStyle, _
        ByVal firstDisplayedColumn As Boolean, ByVal lastVisibleColumn As Boolean) _
        As DataGridViewAdvancedBorderStyle

        ' Customize the left border of the first column header and the
        ' bottom border of all the column headers. Use the input style for 
        ' all other borders.
        If firstDisplayedColumn Then
            dataGridViewAdvancedBorderStylePlaceHolder.Left = _
                DataGridViewAdvancedCellBorderStyle.OutsetDouble
        Else
            dataGridViewAdvancedBorderStylePlaceHolder.Left = _
                DataGridViewAdvancedCellBorderStyle.None
        End If

        With dataGridViewAdvancedBorderStylePlaceHolder
            .Bottom = DataGridViewAdvancedCellBorderStyle.Single
            .Right = dataGridViewAdvancedBorderStyleInput.Right
            .Top = dataGridViewAdvancedBorderStyleInput.Top
        End With

        Return dataGridViewAdvancedBorderStylePlaceHolder
    End Function
End Class

설명

합니다 DataGridView 컨트롤을 내부적으로 호출 된 AdjustColumnHeaderBorderStyle 열 머리글 셀에 대 한 테두리의 모양을 결정 하는 방법.The DataGridView control internally calls the AdjustColumnHeaderBorderStyle method to determine the appearance of the borders for the column header cells. DataGridView 컨트롤의 값을 일반적으로 사용 합니다 AdvancedColumnHeadersBorderStyle 속성에 대 한는 dataGridViewAdvancedBorderStyleInput 매개 변수입니다.The DataGridView control typically uses the value of the AdvancedColumnHeadersBorderStyle property for the dataGridViewAdvancedBorderStyleInput parameter.

상속자 참고

열 머리글 셀의 테두리의 모양을 사용자 지정 하려는 경우이 메서드를 재정의 합니다.Override this method if you want to customize the appearance of the border on column header cells.

적용 대상

추가 정보