DataGridViewHeaderCell.MouseDownUnsharesRow(DataGridViewCellMouseEventArgs) DataGridViewHeaderCell.MouseDownUnsharesRow(DataGridViewCellMouseEventArgs) DataGridViewHeaderCell.MouseDownUnsharesRow(DataGridViewCellMouseEventArgs) DataGridViewHeaderCell.MouseDownUnsharesRow(DataGridViewCellMouseEventArgs) Method

定義

指出當指標位於某資料列的儲存格上,並按住滑鼠按鈕時,是否會取消共用該資料列。Indicates whether a row will be unshared when the mouse button is held down while the pointer is on a cell in the row.

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

參數

傳回

如果使用者以滑鼠左鍵按一下、啟用視覺化樣式,且 EnableHeadersVisualStyles 屬性為 true 時,則為 true,否則為 falsetrue if the user clicks with the left mouse button, visual styles are enabled, and the EnableHeadersVisualStyles property is true; otherwise, false.

備註

如需啟用視覺化樣式的詳細資訊, Application.EnableVisualStyles請參閱方法。For information about enabling visual styles, see the Application.EnableVisualStyles method.

MouseDownUnsharesRow只會在之前OnMouseDown呼叫。MouseDownUnsharesRow is called just before OnMouseDown. true如果的rowIndex呼叫具有取消共用資料列的效果, 則必須傳回。 OnMouseDownIt must return true if the call to OnMouseDown has the effect of unsharing the row rowIndex. false否則應該會傳回。It should return false otherwise.

如需有關資料列共用的詳細資訊, 請參閱縮放 Windows Forms DataGridView 控制項的最佳做法For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.

適用於

另請參閱