DataGridViewCell.PositionEditingControl(Boolean, Boolean, Rectangle, Rectangle, DataGridViewCellStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewCell.PositionEditingControl(Boolean, Boolean, Rectangle, Rectangle, DataGridViewCellStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewCell.PositionEditingControl(Boolean, Boolean, Rectangle, Rectangle, DataGridViewCellStyle, Boolean, Boolean, Boolean, Boolean) DataGridViewCell.PositionEditingControl(Boolean, Boolean, Rectangle, Rectangle, DataGridViewCellStyle, Boolean, Boolean, Boolean, Boolean) Method

Definición

Establece la ubicación y tamaño del control de edición que hospeda una celda del control DataGridView.Sets the location and size of the editing control hosted by a cell in the DataGridView control.

public:
 virtual void PositionEditingControl(bool setLocation, bool setSize, System::Drawing::Rectangle cellBounds, System::Drawing::Rectangle cellClip, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedColumn, bool isFirstDisplayedRow);
public virtual void PositionEditingControl (bool setLocation, bool setSize, System.Drawing.Rectangle cellBounds, System.Drawing.Rectangle cellClip, System.Windows.Forms.DataGridViewCellStyle cellStyle, bool singleVerticalBorderAdded, bool singleHorizontalBorderAdded, bool isFirstDisplayedColumn, bool isFirstDisplayedRow);
abstract member PositionEditingControl : bool * bool * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Windows.Forms.DataGridViewCellStyle * bool * bool * bool * bool -> unit
override this.PositionEditingControl : bool * bool * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Windows.Forms.DataGridViewCellStyle * bool * bool * bool * bool -> unit
Public Overridable Sub PositionEditingControl (setLocation As Boolean, setSize As Boolean, cellBounds As Rectangle, cellClip As Rectangle, cellStyle As DataGridViewCellStyle, singleVerticalBorderAdded As Boolean, singleHorizontalBorderAdded As Boolean, isFirstDisplayedColumn As Boolean, isFirstDisplayedRow As Boolean)

Parámetros

setLocation
Boolean Boolean Boolean Boolean

true para que el control se sitúe como especifican los demás argumentos; false para permitir que el control se coloque por sí mismo.true to have the control placed as specified by the other arguments; false to allow the control to place itself.

setSize
Boolean Boolean Boolean Boolean

true para especificar el tamaño; false para permitir que el propio tamaño ajuste su control.true to specify the size; false to allow the control to size itself.

cellBounds
Rectangle Rectangle Rectangle Rectangle

Rectangle que define los límites de la celda.A Rectangle that defines the cell bounds.

cellClip
Rectangle Rectangle Rectangle Rectangle

Área que se va a utilizar para dibujar el control de edición.The area that will be used to paint the editing control.

cellStyle
DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle

DataGridViewCellStyle que representa el estilo de la celda que se está editando.A DataGridViewCellStyle that represents the style of the cell being edited.

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.

Excepciones

La celda no está incluida dentro de un control DataGridView.The cell is not contained within a DataGridView control.

Comentarios

Algunas clases derivadas de la DataGridViewCell clase, como DataGridViewComboBoxCell, hospedar un control en la celda seleccionada.Some classes derived from the DataGridViewCell class, such as DataGridViewComboBoxCell, host a control in the selected cell. El PositionEditingControl método coloca el control de edición dentro de la celda de host.The PositionEditingControl method positions the editing control inside of the host cell. Dado que el control de edición puede tardar hasta más de espacio que una sola celda, puede que necesite colocarse forma diferente cuando se edita una celda de la primera columna visible o la primera fila visible, por lo que no se dibuja fuera el DataGridView.Because the editing control may take up more space than a single cell, it may need to be positioned differently when editing a cell in the first visible column or first visible row so it does not paint outside the DataGridView.

Se aplica a

Consulte también: