DataGridViewRow.AdjustRowHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) Método

Definición

Modifica un estilo de borde de encabezado de fila de entrada según los criterios especificados.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

Parámetros

dataGridViewAdvancedBorderStyleInput
DataGridViewAdvancedBorderStyle

DataGridViewAdvancedBorderStyle que representa el estilo de borde de encabezado de fila que se va a modificar.A DataGridViewAdvancedBorderStyle that represents the row header border style to modify.

dataGridViewAdvancedBorderStylePlaceholder
DataGridViewAdvancedBorderStyle

DataGridViewAdvancedBorderStyle que se utiliza para almacenar los cambios intermedios realizados al estilo de borde del encabezado de fila.A DataGridViewAdvancedBorderStyle that is used to store intermediate changes to the row header border style.

singleVerticalBorderAdded
Boolean

true para agregar un borde vertical sencillo al resultado; de lo contrario, false.true to add a single vertical border to the result; otherwise, false.

singleHorizontalBorderAdded
Boolean

true para agregar un borde horizontal sencillo al resultado; de lo contrario, false.true to add a single horizontal border to the result; otherwise, false.

isFirstDisplayedRow
Boolean

true si la fila es la primera que se muestra en DataGridView; de lo contrario, false.true if the row is the first row displayed in the DataGridView; otherwise, false.

isLastVisibleRow
Boolean

true si la fila es la última de DataGridView que tiene establecida la propiedad Visible en true; de lo contrario, false.true if the row is the last row in the DataGridView that has its Visible property set to true; otherwise, false.

Devoluciones

DataGridViewAdvancedBorderStyle que representa el nuevo estilo de borde utilizado.A DataGridViewAdvancedBorderStyle that represents the new border style used.

Ejemplos

En el ejemplo de código siguiente se muestra cómo invalidar el método AdjustRowHeaderBorderStyle para personalizar los bordes de las celdas de encabezado de fila.The following code example demonstrates how to override the AdjustRowHeaderBorderStyle method to customize the borders of the row header cells. Este ejemplo de código forma parte de un ejemplo más extenso proporcionado para la clase 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

Comentarios

El control DataGridView llama internamente al método AdjustRowHeaderBorderStyle para determinar la apariencia de los bordes de las celdas de encabezado de fila.The DataGridView control internally calls the AdjustRowHeaderBorderStyle method to determine the appearance of the borders for the row header cells. Normalmente, el control DataGridView usa el valor de la propiedad AdvancedRowHeadersBorderStyle para el parámetro dataGridViewAdvancedBorderStyleInput.The DataGridView control typically uses the value of the AdvancedRowHeadersBorderStyle property for the dataGridViewAdvancedBorderStyleInput parameter.

Notas a los desarrolladores de herederos

Invalide este método si desea personalizar la apariencia de los bordes de las celdas de encabezado de fila.Override this method if you want to customize the appearance of the borders of row header cells.

Se aplica a

Consulte también: