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

包含儲存格的資料列之索引。

備註

如果方法處於另一個狀態,且已針對標頭啟用視覺化樣式,方法 OnMouseLeaveButtonStateNormal 會將 設定為 。 如需標頭視覺化樣式的詳細資訊,請參閱 DataGridView.EnableHeadersVisualStyles 屬性。

這個方法類似于 DataGridView.OnCellMouseLeave 方法。 它會在引發事件的相同情況下 DataGridView.CellMouseLeave 呼叫,但實際上不會引發事件。

給繼承者的注意事項

OnMouseLeave(Int32) 衍生類別中覆寫時,請務必呼叫基類的 OnMouseLeave(Int32) 方法。

適用於

另請參閱