DataGridViewCell.OnLeave(Int32, Boolean) 方法

定义

当焦点从单元格上移开时调用。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

该单元格的父行索引。The index of the cell's parent row.

throughMouseClick
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.

适用于

另请参阅