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

定义

设置单元格承载的编辑面板的位置和大小,并返回编辑面板内编辑控件的正常界限。Sets the location and size of the editing panel hosted by the cell, and returns the normal bounds of the editing control within the editing panel.

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

参数

cellBounds
Rectangle Rectangle Rectangle Rectangle

定义单元格界限的 RectangleA Rectangle that defines the cell bounds.

cellClip
Rectangle Rectangle Rectangle Rectangle

将用于绘制编辑面板的区域。The area that will be used to paint the editing panel.

cellStyle
DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle

DataGridViewCellStyle,它表示当前所编辑的单元格的样式。A DataGridViewCellStyle that represents the style of the cell being edited.

singleVerticalBorderAdded
Boolean Boolean Boolean Boolean

若要向单元格添加竖框线,则为 true;否则为 falsetrue to add a vertical border to the cell; otherwise, false.

singleHorizontalBorderAdded
Boolean Boolean Boolean Boolean

若要向单元格添加横框线,则为 true;否则为 falsetrue to add a horizontal border to the cell; otherwise, false.

isFirstDisplayedColumn
Boolean Boolean Boolean Boolean

如果该单元格位于控件中当前显示的第一列,则为 true;否则为 falsetrue if the cell is in the first column currently displayed in the control; otherwise, false.

isFirstDisplayedRow
Boolean Boolean Boolean Boolean

如果该单元格位于控件中当前显示的第一行,则为true;否则为 falsetrue if the cell is in the first row currently displayed in the control; otherwise, false.

返回

Rectangle,它表示编辑面板内编辑控件的正常界限。A Rectangle that represents the normal bounds of the editing control within the editing panel.

异常

尚未将此单元格添加到 DataGridView 控件中。The cell has not been added to a DataGridView control.

适用于

另请参阅