DataGridViewRow.AdjustRowHeaderBorderStyle 메서드

정의

지정된 조건에 따라 입력 행 머리글의 테두리 스타일을 수정합니다.

public:
 virtual System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ AdjustRowHeaderBorderStyle(System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStyleInput, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ dataGridViewAdvancedBorderStylePlaceholder, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedRow, bool isLastVisibleRow);
public virtual System.Windows.Forms.DataGridViewAdvancedBorderStyle AdjustRowHeaderBorderStyle (System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput, System.Windows.Forms.DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceholder, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedRow, bool isLastVisibleRow);
abstract member AdjustRowHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
override this.AdjustRowHeaderBorderStyle : System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * bool * bool * bool * bool -> System.Windows.Forms.DataGridViewAdvancedBorderStyle
Public Overridable Function AdjustRowHeaderBorderStyle (dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, dataGridViewAdvancedBorderStylePlaceholder As DataGridViewAdvancedBorderStyle, singleVerticalBorderAdded As Boolean, singleHorizontalBorderAdded As Boolean, isFirstDisplayedRow As Boolean, isLastVisibleRow As Boolean) As DataGridViewAdvancedBorderStyle

매개 변수

dataGridViewAdvancedBorderStyleInput
DataGridViewAdvancedBorderStyle

수정할 행 머리글의 테두리 스타일을 나타내는 DataGridViewAdvancedBorderStyle입니다.

dataGridViewAdvancedBorderStylePlaceholder
DataGridViewAdvancedBorderStyle

행 머리글의 테두리 스타일에 대한 중간 변경 사항을 저장하는 데 사용되는 DataGridViewAdvancedBorderStyle입니다.

singleVerticalBorderAdded
Boolean

결과에 세로 테두리를 하나 추가하려면 true이고, 그렇지 않으면 false입니다.

singleHorizontalBorderAdded
Boolean

결과에 가로 테두리를 하나 추가하려면 true이고, 그렇지 않으면 false입니다.

isFirstDisplayedRow
Boolean

행이 DataGridView에 표시되는 첫 번째 행이면 true이고, 그렇지 않으면 false입니다.

isLastVisibleRow
Boolean

행이 DataGridView 속성이 true로 설정된 Visible의 마지막 행이면 true이고, 그렇지 않으면 false입니다.

반환

DataGridViewAdvancedBorderStyle

사용된 새 테두리 스타일을 나타내는 DataGridViewAdvancedBorderStyle입니다.

예제

다음 코드 예제에서는 행 머리글 셀의 테두리를 사용자 지정 하는 메서드를 재정 AdjustRowHeaderBorderStyle 의 하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataGridViewAdvancedBorderStyle 클래스입니다.

public override DataGridViewAdvancedBorderStyle AdjustRowHeaderBorderStyle(
    DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput,
    DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceHolder,
    bool singleVerticalBorderAdded,
    bool singleHorizontalBorderAdded,
    bool isFirstDisplayedRow,
    bool isLastDisplayedRow)
{
    // Customize the top border of the first row header and the
    // right border of all the row headers. Use the input style for 
    // all other borders.
    dataGridViewAdvancedBorderStylePlaceHolder.Top = isFirstDisplayedRow ?
        DataGridViewAdvancedCellBorderStyle.InsetDouble :
        DataGridViewAdvancedCellBorderStyle.None;
    dataGridViewAdvancedBorderStylePlaceHolder.Right =
        DataGridViewAdvancedCellBorderStyle.OutsetDouble;

    dataGridViewAdvancedBorderStylePlaceHolder.Left =
        dataGridViewAdvancedBorderStyleInput.Left;
    dataGridViewAdvancedBorderStylePlaceHolder.Bottom =
        dataGridViewAdvancedBorderStyleInput.Bottom;

    return dataGridViewAdvancedBorderStylePlaceHolder;
}
    Public Overrides Function AdjustRowHeaderBorderStyle( _
        ByVal dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, _
        ByVal dataGridViewAdvancedBorderStylePlaceHolder As DataGridViewAdvancedBorderStyle, _
        ByVal singleVerticalBorderAdded As Boolean, _
        ByVal singleHorizontalBorderAdded As Boolean, _
        ByVal isFirstDisplayedRow As Boolean, _
        ByVal isLastDisplayedRow As Boolean) As DataGridViewAdvancedBorderStyle

        ' Customize the top border of the first row header and the
        ' right border of all the row headers. Use the input style for 
        ' all other borders.
        If isFirstDisplayedRow Then
            dataGridViewAdvancedBorderStylePlaceHolder.Top = _
                DataGridViewAdvancedCellBorderStyle.InsetDouble
        Else
            dataGridViewAdvancedBorderStylePlaceHolder.Top = _
                DataGridViewAdvancedCellBorderStyle.None
        End If

        With dataGridViewAdvancedBorderStylePlaceHolder
            .Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble
            .Left = dataGridViewAdvancedBorderStyleInput.Left
            .Bottom = dataGridViewAdvancedBorderStyleInput.Bottom
        End With

        Return dataGridViewAdvancedBorderStylePlaceHolder
    End Function
End Class

설명

컨트롤은 DataGridView 내부적으로 메서드를 AdjustRowHeaderBorderStyle 호출하여 행 머리글 셀의 테두리 모양을 확인합니다. 컨트롤은 DataGridView 일반적으로 매개 변수에 AdvancedRowHeadersBorderStyle 대 한 dataGridViewAdvancedBorderStyleInput 속성의 값을 사용 합니다.

상속자 참고

행 머리글 셀의 테두리 모양을 사용자 지정하려는 경우 이 메서드를 재정의합니다.

적용 대상

추가 정보