DataGridViewHeaderCell.OnMouseLeave(Int32) 方法

定义

在鼠标指针离开单元格时调用。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

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

注解

OnMouseLeave ButtonState Normal 如果已处于其他状态,则方法会将设置为,并为标头启用视觉样式。The 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.

适用于

另请参阅