DataGridViewRow.AdjustRowHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewRow.AdjustRowHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewRow.AdjustRowHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewRow.AdjustRowHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) Method

定義

指定した条件に従って、入力行ヘッダー境界線スタイルを変更します。Modifies an input row header border style according to the specified criteria.

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 DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

変更する行ヘッダー境界線スタイルを表す DataGridViewAdvancedBorderStyleA DataGridViewAdvancedBorderStyle that represents the row header border style to modify.

dataGridViewAdvancedBorderStylePlaceholder
DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

行ヘッダー境界線スタイルに対する中間的な変更を格納するために使用される DataGridViewAdvancedBorderStyleA DataGridViewAdvancedBorderStyle that is used to store intermediate changes to the row header border style.

singleVerticalBorderAdded
Boolean Boolean Boolean Boolean

結果に一重線の垂直方向の境界線を追加する場合は true。それ以外の場合は falsetrue to add a single vertical border to the result; otherwise, false.

singleHorizontalBorderAdded
Boolean Boolean Boolean Boolean

結果に一重線の水平方向の境界線を追加する場合は true。それ以外の場合は falsetrue to add a single horizontal border to the result; otherwise, false.

isFirstDisplayedRow
Boolean Boolean Boolean Boolean

その行が DataGridView で最初に表示される行の場合は true。それ以外の場合は falsetrue if the row is the first row displayed in the DataGridView; otherwise, false.

isLastVisibleRow
Boolean Boolean Boolean Boolean

その行が、DataGridView プロパティが true に設定された、Visible の最後の行の場合は true。それ以外の場合は falsetrue if the row is the last row in the DataGridView that has its Visible property set to true; otherwise, false.

戻り値

次のコード例は、 AdjustRowHeaderBorderStyleメソッドをオーバーライドして、行ヘッダーセルの境界線をカスタマイズする方法を示しています。The following code example demonstrates how to override the AdjustRowHeaderBorderStyle method to customize the borders of the row header cells. このコード例は、 DataGridViewAdvancedBorderStyleクラスに対して提供される大規模な例の一部です。This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.

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にメソッドを呼び出して、行ヘッダーセルの境界線の外観を決定します。The DataGridView control internally calls the AdjustRowHeaderBorderStyle method to determine the appearance of the borders for the row header cells. コントロールDataGridViewは、通常、 dataGridViewAdvancedBorderStyleInputパラメーターのAdvancedRowHeadersBorderStyleプロパティの値を使用します。The DataGridView control typically uses the value of the AdvancedRowHeadersBorderStyle property for the dataGridViewAdvancedBorderStyleInput parameter.

注意 (継承者)

行ヘッダーセルの境界線の外観をカスタマイズする場合は、このメソッドをオーバーライドします。Override this method if you want to customize the appearance of the borders of row header cells.

適用対象

こちらもご覧ください