DataGridViewCell.OnLeave(Int32, Boolean) DataGridViewCell.OnLeave(Int32, Boolean) DataGridViewCell.OnLeave(Int32, Boolean) DataGridViewCell.OnLeave(Int32, Boolean) Method

定義

當焦點從儲存格移動時呼叫。Called when the focus moves from a cell.

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 Int32 Int32 Int32

儲存格的父資料列索引。The index of the cell's parent row.

throughMouseClick
Boolean Boolean Boolean Boolean

如果使用者動作將焦點從儲存格移開,則為 true;如果程式設計作業將焦點從儲存格移開,則為 falsetrue if a user action moved focus from the cell; false if a programmatic operation moved focus from the cell.

備註

這個方法與DataGridView.OnCellLeave方法類似。This method is similar to the DataGridView.OnCellLeave method. 在引發DataGridView.CellLeave事件的相同情況下呼叫它,但實際上並不會引發事件。It is called in the same circumstances in which a DataGridView.CellLeave event is raised, but it does not actually raise the event.

適用於

另請參閱