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

Es true para que el control se sitúe según especifican los demás argumentos; es 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

Es true para especificar el tamaño; es false para permitir que el propio control ajuste su tamaño.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 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

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

isFirstDisplayedRow
Boolean Boolean Boolean Boolean

Es true si la celda de hospedaje está en la primera fila visible; de lo contrario, es 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 DataGridViewCell la clase, DataGridViewComboBoxCellcomo, hospedan 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 del host.The PositionEditingControl method positions the editing control inside of the host cell. Dado que el control de edición puede ocupar más espacio que una sola celda, puede que tenga que colocarse de forma diferente al editar una celda en la primera columna visible o en la primera fila visible para DataGridViewque no se pinte fuera del.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: