> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# GetCursor()

## Definition

An event driven method which is called when a chart object is selected. This method can be used to change the cursor image used in various states.

## Method Return Value

This method returns a **Cursor** used to paint the mouse pointer.

## Syntax

You must override the method in your Drawing Tool with the following syntax:

`public override Cursor GetCursor(ChartControl chartControl, ChartPanel chartPanel, ChartScale chartScale, Point point)`

## Method Parameters

| Parameter        | Description                                                                                                     |
| ---------------- | --------------------------------------------------------------------------------------------------------------- |
| **chartControl** | A [ChartControl](/developer/desktop-sdk/references/common/charts/chartcontrol) representing the x-axis          |
| **chartPanel**   | A [ChartPanel](/developer/desktop-sdk/references/common/charts/chartpanel) representing the panel for the chart |
| **chartScale**   | A [ChartScale](/developer/desktop-sdk/references/common/charts/chartscale) representing the y-axis              |
| **point**        | A Point in device pixels representing the current mouse cursor position                                         |

## Examples

```csharp
public override Cursor GetCursor(ChartControl chartControl, ChartPanel chartPanel, ChartScale chartScale, Point point)
{
    switch (DrawingState)
    {
        //when drawing, display the cursor as a pen
        case DrawingState.Building:   return Cursors.Pen;

        // when moving, display a four-headed sizing cursor
        case DrawingState.Moving:   return Cursors.SizeAll;

        default: return Cursors.Pen;
    }
}
```