DataGridViewHeaderCell.OnMouseUp(DataGridViewCellMouseEventArgs) DataGridViewHeaderCell.OnMouseUp(DataGridViewCellMouseEventArgs) DataGridViewHeaderCell.OnMouseUp(DataGridViewCellMouseEventArgs) DataGridViewHeaderCell.OnMouseUp(DataGridViewCellMouseEventArgs) Method

定义

当指针移到单元格上并释放鼠标按钮时调用。Called when the mouse button is released while the pointer is over the cell.

protected:
 override void OnMouseUp(System::Windows::Forms::DataGridViewCellMouseEventArgs ^ e);
protected override void OnMouseUp (System.Windows.Forms.DataGridViewCellMouseEventArgs e);
override this.OnMouseUp : System.Windows.Forms.DataGridViewCellMouseEventArgs -> unit
Protected Overrides Sub OnMouseUp (e As DataGridViewCellMouseEventArgs)

参数

注解

OnMouseUp方法设置ButtonStateNormal如果已释放鼠标左键和标头启用了可视样式。The OnMouseUp method sets the ButtonState to Normal if the left mouse button was released and visual styles are enabled for headers. 对于标头的视觉样式的详细信息,请参阅DataGridView.EnableHeadersVisualStyles属性。For more information about visual styles for headers, see the DataGridView.EnableHeadersVisualStyles property.

此方法是类似于DataGridView.OnCellMouseUp方法。This method is similar to the DataGridView.OnCellMouseUp method. 在同一环境中调用DataGridView.CellMouseUp引发事件,但不会实际引发该事件。It is called in the same circumstances in which a DataGridView.CellMouseUp event is raised, but it does not actually raise the event.

继承者说明

重写时OnMouseUp(DataGridViewCellMouseEventArgs)在派生类中,请务必调用基类的OnMouseUp(DataGridViewCellMouseEventArgs)方法。When overriding OnMouseUp(DataGridViewCellMouseEventArgs) in a derived class, be sure to call the base class's OnMouseUp(DataGridViewCellMouseEventArgs) method.

适用于

另请参阅