DataGridViewButtonCell.OnMouseLeave(Int32) 方法

定义

当鼠标指针移出单元格时调用。Called when the mouse pointer moves out of the cell.

protected:
 override void OnMouseLeave(int rowIndex);
protected override void OnMouseLeave (int rowIndex);
override this.OnMouseLeave : int -> unit
Protected Overrides Sub OnMouseLeave (rowIndex As Integer)

参数

rowIndex
Int32

当前单元格的行索引,如果该单元格不在任何行中则为 -1。The row index of the current cell, or -1 if the cell is not owned by a row.

注解

如果该单元格的按钮不处于正常状态,则此方法会使该单元格的用户界面 (UI) 进行更新。If the cell's button is not in its normal state, this method causes the cell's user interface (UI) to be updated.

此方法类似于 Control.OnMouseLeave 方法。This method is similar to the Control.OnMouseLeave method. 在引发事件的相同情况下,它会被调用 MouseLeave ,但实际上不会引发事件。It is called in the same circumstances in which a MouseLeave event is raised, but it does not actually raise the event.

继承者说明

在派生类中重写 OnMouseLeave(Int32) 时,一定要调用基类的 OnMouseLeave(Int32) 方法,以便已注册的委托对事件进行接收。When overriding OnMouseLeave(Int32) in a derived class, be sure to call the base class's OnMouseLeave(Int32) method so that registered delegates receive the event.

适用于

另请参阅