DataGridViewHeaderCell.MouseLeaveUnsharesRow(Int32) DataGridViewHeaderCell.MouseLeaveUnsharesRow(Int32) DataGridViewHeaderCell.MouseLeaveUnsharesRow(Int32) DataGridViewHeaderCell.MouseLeaveUnsharesRow(Int32) Method

定義

指示當滑鼠指標離開某列時,該列是否共用。Indicates whether a row will be unshared when the mouse pointer leaves the row.

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 Int32 Int32 Int32

滑鼠指標離開的資料列之索引。The index of the row that the mouse pointer left.

傳回

如果 ButtonState 屬性值不是 Normal、已啟用視覺化樣式,且 EnableHeadersVisualStyles 屬性為 true,則為 true,否則為 falsetrue if the ButtonState property value is not Normal, 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.

MouseLeaveUnsharesRow只會在之前OnMouseLeave呼叫。MouseLeaveUnsharesRow is called just before OnMouseLeave. true如果的rowIndex呼叫具有取消共用資料列的效果, 則必須傳回。 OnMouseLeaveIt must return true if the call to OnMouseLeave 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.

適用於

另請參閱