語言

DataGridViewHeaderCell.MouseLeaveUnsharesRow(Int32) 方法

定義

表示當滑鼠指標離開該列時,該列是否會被取消共享。

protected:
 override bool MouseLeaveUnsharesRow(int rowIndex);
protected override bool MouseLeaveUnsharesRow(int rowIndex);
override this.MouseLeaveUnsharesRow : int -> bool
Protected Overrides Function MouseLeaveUnsharesRow (rowIndex As Integer) As Boolean

參數

rowIndex
Int32

滑鼠指標離開的那一列索引。

傳回

true若ButtonState屬性值不Normal為 ,則啟用視覺樣式,屬性EnableHeadersVisualStyles為 ,屬性 true 不DataGridView為 null;否則, false。

備註

關於啟用視覺樣式的資訊,請參閱方法。Application.EnableVisualStyles

MouseLeaveUnsharesRow 在 之前稱為 OnMouseLeave。 如果呼叫 的true結果是將該列 OnMouseLeave取消共享,則必須返回rowIndex。 否則應該會恢復 false 正常。

如需有關資料列共用的詳細資訊,請參閱縮放 Windows Forms DataGridView 控制項的最佳做法。

適用於

另請參閱