DataGridViewCell.PositionEditingControl メソッド

定義

DataGridView コントロールのセルによってホストされる編集コントロールの位置とサイズを設定します。

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)

パラメーター

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

例外

セルが DataGridView コントロール内に含まれていません。

注釈

クラスから DataGridViewCell 派生したクラスの中には、選択したセルでコントロールをホストするクラスがあります DataGridViewComboBoxCell。 このメソッドは PositionEditingControl 、編集コントロールをホスト セルの内部に配置します。 編集コントロールは 1 つのセルよりも多くの領域を占有する可能性があるため、最初に表示される列または最初に表示される行のセルを編集するときに、セルが外側 DataGridViewに描画されないように、別の位置に配置する必要がある場合があります。

適用対象

こちらもご覧ください