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.

備註

方法會將設Normal為, 如果它是在另一個狀態, 而且已為標頭啟用視覺化樣式。 ButtonState 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.

適用於

另請參閱