DataGridViewHeaderCell.MouseEnterUnsharesRow(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示當滑鼠指標移動到該列中的某個格子時,該列是否會被取消共享。
protected:
override bool MouseEnterUnsharesRow(int rowIndex);
protected override bool MouseEnterUnsharesRow(int rowIndex);
override this.MouseEnterUnsharesRow : int -> bool
Protected Overrides Function MouseEnterUnsharesRow (rowIndex As Integer) As Boolean
參數
- rowIndex
- Int32
滑鼠指標進入的列索引。
傳回
true若啟用視覺樣式,且屬性EnableHeadersVisualStyles為 ,且true屬性不DataGridView為 ;否則, nullfalse。
備註
關於啟用視覺樣式的資訊,請參閱方法。Application.EnableVisualStyles
MouseEnterUnsharesRow 在 之前稱為 OnMouseEnter。 如果呼叫 的true結果是將該列 OnMouseEnter取消共享,則必須返回rowIndex。 否則應該會恢復 false 正常。
如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法。
給繼承者的注意事項
在導出類別中覆寫 MouseEnterUnsharesRow(Int32) 時,務必呼叫基底類別的方法 MouseEnterUnsharesRow(Int32) ,讓註冊代理接收事件。