DataGridViewCell.OnLeave(Int32, Boolean) 方法

定義

當焦點從儲存格移動時呼叫。

protected:
 virtual void OnLeave(int rowIndex, bool throughMouseClick);
protected virtual void OnLeave (int rowIndex, bool throughMouseClick);
abstract member OnLeave : int * bool -> unit
override this.OnLeave : int * bool -> unit
Protected Overridable Sub OnLeave (rowIndex As Integer, throughMouseClick As Boolean)

參數

rowIndex
Int32

儲存格的父資料列索引。

throughMouseClick
Boolean

如果使用者動作將焦點從儲存格移開,則為 true;如果程式設計作業將焦點從儲存格移開,則為 false

備註

這個方法類似于 DataGridView.OnCellLeave 方法。 它會在引發事件的相同情況下 DataGridView.CellLeave 呼叫,但實際上不會引發事件。

適用於

另請參閱