DataGridViewCell.AdjustCellBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewCell.AdjustCellBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewCell.AdjustCellBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewCell.AdjustCellBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean) Method

Definición

Modifica el estilo de borde de celda de entrada según los criterios especificados.Modifies the input cell border style according to the specified criteria.

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

Parámetros

dataGridViewAdvancedBorderStyleInput
DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

DataGridViewAdvancedBorderStyle que representa el estilo de borde de celda que se va a modificar.A DataGridViewAdvancedBorderStyle that represents the cell border style to modify.

dataGridViewAdvancedBorderStylePlaceholder
DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle DataGridViewAdvancedBorderStyle

DataGridViewAdvancedBorderStyle que se utiliza para almacenar los cambios intermedios realizados al estilo de borde de la celda.A DataGridViewAdvancedBorderStyle that is used to store intermediate changes to the cell border style.

singleVerticalBorderAdded
Boolean Boolean Boolean Boolean

true para agregar un borde vertical a la celda; de lo contrario, false.true to add a vertical border to the cell; otherwise, false.

singleHorizontalBorderAdded
Boolean Boolean Boolean Boolean

true para agregar un borde horizontal a la celda; de lo contrario, false.true to add a horizontal border to the cell; otherwise, false.

isFirstDisplayedColumn
Boolean Boolean Boolean Boolean

true si la celda de hospedaje está en la primera columna visible; de lo contrario, false.true if the hosting cell is in the first visible column; otherwise, false.

isFirstDisplayedRow
Boolean Boolean Boolean Boolean

true si la celda de hospedaje está en la primera fila visible; de lo contrario, false.true if the hosting cell is in the first visible row; otherwise, false.

Devoluciones

Ejemplos

En el ejemplo de código siguiente se muestra cómo invalidar el AdjustCellBorderStyle método para personalizar los bordes de las celdas.The following code example demonstrates how to override the AdjustCellBorderStyle method to customize the borders of the cells. Este ejemplo de código forma parte de un ejemplo más extenso proporcionado para el DataGridViewAdvancedBorderStyle clase.This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.

public override DataGridViewAdvancedBorderStyle AdjustCellBorderStyle(
    DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStyleInput,
    DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceHolder,
    bool singleVerticalBorderAdded,
    bool singleHorizontalBorderAdded,
    bool firstVisibleColumn,
    bool firstVisibleRow)
{
    // Customize the top border of cells in the first row and the 
    // right border of cells in the first column. Use the input style 
    // for all other borders.
    dataGridViewAdvancedBorderStylePlaceHolder.Left = firstVisibleColumn ?
        DataGridViewAdvancedCellBorderStyle.OutsetDouble :
        DataGridViewAdvancedCellBorderStyle.None;
    dataGridViewAdvancedBorderStylePlaceHolder.Top = firstVisibleRow ?
        DataGridViewAdvancedCellBorderStyle.InsetDouble :
        DataGridViewAdvancedCellBorderStyle.None;

    dataGridViewAdvancedBorderStylePlaceHolder.Right =
        dataGridViewAdvancedBorderStyleInput.Right;
    dataGridViewAdvancedBorderStylePlaceHolder.Bottom =
        dataGridViewAdvancedBorderStyleInput.Bottom;

    return dataGridViewAdvancedBorderStylePlaceHolder;
}
    Public Overrides Function AdjustCellBorderStyle( _
        ByVal dataGridViewAdvancedBorderStyleInput As DataGridViewAdvancedBorderStyle, _
        ByVal dataGridViewAdvancedBorderStylePlaceHolder As DataGridViewAdvancedBorderStyle, _
        ByVal singleVerticalBorderAdded As Boolean, _
        ByVal singleHorizontalBorderAdded As Boolean, _
        ByVal firstVisibleColumn As Boolean, _
        ByVal firstVisibleRow As Boolean) As DataGridViewAdvancedBorderStyle

        ' Customize the top border of cells in the first row and the 
        ' right border of cells in the first column. Use the input style 
        ' for all other borders.
        If firstVisibleColumn Then
            dataGridViewAdvancedBorderStylePlaceHolder.Left = _
                DataGridViewAdvancedCellBorderStyle.OutsetDouble
        Else
            dataGridViewAdvancedBorderStylePlaceHolder.Left = _
                DataGridViewAdvancedCellBorderStyle.None
        End If

        If firstVisibleRow Then
            dataGridViewAdvancedBorderStylePlaceHolder.Top = _
                DataGridViewAdvancedCellBorderStyle.InsetDouble
        Else
            dataGridViewAdvancedBorderStylePlaceHolder.Top = _
                DataGridViewAdvancedCellBorderStyle.None
        End If

        With dataGridViewAdvancedBorderStylePlaceHolder
            .Right = dataGridViewAdvancedBorderStyleInput.Right
            .Bottom = dataGridViewAdvancedBorderStyleInput.Bottom
        End With

        Return dataGridViewAdvancedBorderStylePlaceHolder
    End Function
End Class

Comentarios

El DataGridView las llamadas de control internamente el AdjustCellBorderStyle método para determinar la apariencia de los bordes de celda.The DataGridView control internally calls the AdjustCellBorderStyle method to determine the appearance of the cell borders. El DataGridView control normalmente usa el valor de la AdvancedCellBorderStyle propiedad para el dataGridViewAdvancedBorderStyleInput parámetro.The DataGridView control typically uses the value of the AdvancedCellBorderStyle property for the dataGridViewAdvancedBorderStyleInput parameter.

El DataGridViewAdvancedCellBorderStyle.OutsetPartial no se admite el valor como un estilo para las celdas de entrada.The DataGridViewAdvancedCellBorderStyle.OutsetPartial value is not supported as an input style for cells.

Notas a los desarrolladores de herederos

Invalide este método si desea personalizar la apariencia de los bordes de celda.Override this method if you want to customize the appearance of the cell borders.

Se aplica a

Consulte también: