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 之前调用OnMouseLeaveMouseLeaveUnsharesRow is called just before OnMouseLeave. 它必须返回true如果在调用OnMouseLeave起的行取消共享已rowIndexIt must return true if the call to OnMouseLeave has the effect of unsharing the row rowIndex. 它应返回false否则为。It should return false otherwise.

有关行共享的详细信息,请参阅缩放 Windows 窗体 DataGridView 控件的最佳做法For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.

适用于

另请参阅