語言

DataGridViewHeaderCell.MouseDownUnsharesRow 方法

定義

表示當滑鼠按鍵且指標位於該列的某個格子時,該列是否會被取消共享。

protected:
 override bool MouseDownUnsharesRow(System::Windows::Forms::DataGridViewCellMouseEventArgs ^ e);
protected override bool MouseDownUnsharesRow(System.Windows.Forms.DataGridViewCellMouseEventArgs e);
override this.MouseDownUnsharesRow : System.Windows.Forms.DataGridViewCellMouseEventArgs -> bool
Protected Overrides Function MouseDownUnsharesRow (e As DataGridViewCellMouseEventArgs) As Boolean

參數

e
DataGridViewCellMouseEventArgs

DataGridViewCellMouseEventArgs A 裡面包含滑鼠位置的資訊。

傳回

true 如果使用者用滑鼠左鍵點擊,視覺樣式會啟用,屬性 EnableHeadersVisualStyles 為 true, DataGridView 屬性則不是 null;否則, false。

備註

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

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

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

適用於

另請參閱