DataGridViewTextBoxCell.PositionEditingControl 方法

定义

设置由 DataGridView 控件中的单元格承载的编辑控件的位置和大小。

public:
 override 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 override 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);
override this.PositionEditingControl : bool * bool * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Windows.Forms.DataGridViewCellStyle * bool * bool * bool * bool -> unit
Public Overrides 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)

参数

setLocation
Boolean

若要将控件置于其他参数指定的位置,则为 true;如要允许控件自行放置,则为 false

setSize
Boolean

若要指定大小,则为 true;若要允许控件自行调整大小,则为 false

cellBounds
Rectangle

定义单元格界限的 Rectangle

cellClip
Rectangle

将用于绘制编辑控件的区域。

cellStyle
DataGridViewCellStyle

一个 DataGridViewCellStyle,它表示被编辑单元格的样式。

singleVerticalBorderAdded
Boolean

若要向单元格添加竖框线,则为 true;否则为 false

singleHorizontalBorderAdded
Boolean

若要向单元格添加横框线,则为 true;否则为 false

isFirstDisplayedColumn
Boolean

如果宿主单元格位于第一个可见列中,则为 true;否则为 false

isFirstDisplayedRow
Boolean

如果宿主单元格位于第一个可见行中,则为 true;否则为 false

适用于