DataGridViewHeaderCell.OnMouseUp(DataGridViewCellMouseEventArgs) 方法

定义

当指针移到单元格上并释放鼠标按钮时调用。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)

参数

e
DataGridViewCellMouseEventArgs

DataGridViewCellMouseEventArgs,它包含有关鼠标位置的信息。A DataGridViewCellMouseEventArgs that contains information about the mouse position.

注解

OnMouseUp ButtonState Normal 如果已释放鼠标左键并为标题启用了视觉样式,则方法会将设置为。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.

适用于

另请参阅