语言

DataGridViewHeaderCell.OnMouseLeave(Int32) 方法

定义

当鼠标指针离开单元格时调用。

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

包含单元格的行的索引。

注解

该方法 OnMouseLeave 将 ButtonState 设置 Normal 它是否处于另一状态,并且为标头启用了视觉样式。 有关标头的视觉样式的详细信息,请参阅属性 DataGridView.EnableHeadersVisualStyles 。

此方法类似于 DataGridView.OnCellMouseLeave 该方法。 它在引发事件的相同情况下 DataGridView.CellMouseLeave 调用,但实际上不会引发该事件。

继承者说明

在派生类中重写 OnMouseLeave(Int32) 时,请务必调用基类 OnMouseLeave(Int32) 的方法。

适用于

另请参阅