# GH_CanvasMouseEvent class

Namespace: [Grasshopper.GUI](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.gui.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_CanvasMouseEvent : EventArgs
```

Class used in Canvas UI events.

## Constructors

- [GH_CanvasMouseEvent](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/ctor.md): (3 overloads) Blank constructor.

## Properties

- [Button](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/button.md): Gets which mouse button was pressed.
- [CanvasLocation](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/canvaslocation.md): Gets the location of the cursor in canvas unit coordinates.
- [CanvasX](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/canvasx.md): Gets the x-coordinate of the cursor location in canvas unit coordinates.
- [CanvasY](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/canvasy.md): Gets the y-coordinate of the cursor location in canvas unit coordinates.
- [Clicks](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/clicks.md): Gets the number of times the mouse button was pressed and released.
- [ControlLocation](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/controllocation.md): Gets the location of the cursor in control pixel coordinates.
- [ControlX](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/controlx.md): Gets the x-coordinate of the cursor location in control pixel coordinates.
- [ControlY](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/controly.md): Gets the y-coordinate of the cursor location in control pixel coordinates.
- [Delta](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/delta.md): Gets a signed count of the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.
- [WinFormsEventArgs](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-canvasmouseevent/winformseventargs.md): Downcast this data into a Windows.Forms.MouseEventArgs instance.
