DataGridViewHeaderCell.OnMouseLeave(Int32) DataGridViewHeaderCell.OnMouseLeave(Int32) DataGridViewHeaderCell.OnMouseLeave(Int32) DataGridViewHeaderCell.OnMouseLeave(Int32) Method

定义

在鼠标指针离开单元格时调用。Called when the mouse pointer leaves 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 Int32 Int32 Int32

包含该单元格的行的索引。The index of the row containing the cell.

注解

如果已处于其他ButtonState状态Normal , 则方法会将设置为,并为标头启用视觉样式。OnMouseLeaveThe OnMouseLeave method sets the ButtonState to Normal if it was in another state and visual styles are enabled for headers. 有关标题的视觉样式的详细信息, 请参阅DataGridView.EnableHeadersVisualStyles属性。For more information about visual styles for headers, see the DataGridView.EnableHeadersVisualStyles property.

此方法类似DataGridView.OnCellMouseLeave于方法。This method is similar to the DataGridView.OnCellMouseLeave method. 在引发DataGridView.CellMouseLeave事件的相同情况下, 它会被调用, 但实际上不会引发事件。It is called in the same circumstances in which a DataGridView.CellMouseLeave 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.

适用于

另请参阅