DataGridViewHeaderCell.MouseEnterUnsharesRow(Int32) DataGridViewHeaderCell.MouseEnterUnsharesRow(Int32) DataGridViewHeaderCell.MouseEnterUnsharesRow(Int32) DataGridViewHeaderCell.MouseEnterUnsharesRow(Int32) Method

定义

指示当鼠标指针移过行中某个单元格上时,该行是否取消共享状态。Indicates whether a row will be unshared when the mouse pointer moves over a cell in the row.

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

参数

rowIndex
Int32 Int32 Int32 Int32

鼠标指针所进入的行的索引。The index of the row that the mouse pointer entered.

返回

如果启用了可视样式,而且 EnableHeadersVisualStyles 属性是 true,则为 true;否则为 falsetrue if 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.

MouseEnterUnsharesRow在之前OnMouseEnter调用。MouseEnterUnsharesRow is called just before OnMouseEnter. 如果对的true OnMouseEnter调用具有取消共享行rowIndex的效果, 则该方法必须返回。It must return true if the call to OnMouseEnter has the effect of unsharing the row rowIndex. 否则应返回falseIt should return false otherwise.

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

继承者说明

当在MouseEnterUnsharesRow(Int32)派生类中重写时, 请确保调用基类的MouseEnterUnsharesRow(Int32)方法, 以便注册的委托接收事件。When overriding MouseEnterUnsharesRow(Int32) in a derived class, be sure to call the base class' MouseEnterUnsharesRow(Int32) method so that registered delegates receive the event.

适用于

另请参阅