# Customizing the Display of the Pointer

Learn how to customize the display of the pointer in your application with detailed examples and code snippets.

## Content

You can set the cursor or pointer to appear differently for different parts of the display. To determine the pointer to display, use the [GetCursor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.GetCursor.html) method and [SetCursor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.SetCursor.html) method and the [CursorType](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CursorType.html) enumeration. The code for setting the pointer to change when it is over a header cell, as shown in this figure, is given in the example below.
![Hand cursor over header cells](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/cursor-hand.png)
The Spread component uses one pointer for locked cells ([CursorType](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CursorType.html) enumeration equal to Locked) and one pointer for unlocked cells ([CursorType](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CursorType.html) enumeration equal to Normal). The component does not support different pointers for each cell type.

## Cell Types and Reserved Locations

The built-in hyperlink cell type by default uses the hand pointer over the link area. For more information, refer to [Setting a Hyperlink Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setcelltypes/spwin-setgraphcelltypes/spwin-sethyperlinkcell).
Some cell types (for example, button, check box, combo box, and hyperlink) reserve areas within the cell that require special mouse processing. For example, clicking a mouse button while over the drop-down button in a combo box cell immediately enters edit mode. The location of the special area and the pointer used over the special area is determined by the [IsReservedLocation](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.EditBaseCellType.IsReservedLocation.html) and [GetReservedCursor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.BaseCellType.GetReservedCursor.html) methods in the cell type classes. If you do not like the pointer supplied by a built-in cell type class then you could derive a class from the built-in cell type class and override the [GetReservedCursor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.BaseCellType.GetReservedCursor.html) method.
The [GetReservedCursor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.BaseCellType.GetReservedCursor.html) method is only called for locations where [IsReservedLocation](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.EditBaseCellType.IsReservedLocation.html) returns non-null. By returning null (Nothing in VB) or non-null, the **IsReservedLocation** method essentially divides the cell rectangle into two subregions (normal region and reserved region). In the normal subregion, a mouse down is processed by the Spread component and starts a cell selection. Since the mouse down is processed by the Spread component, the mouse pointer is determined by the Spread component (that is, **GetReservedCursor** is not called). In the reserved subregion, a mouse down immediately starts a cell edit and the mouse down gets passed to the cell editor for processing. Since the mouse down is processed by the cell editor, the mouse pointer is determined by the cell type via the **GetReservedCursor** method. While you can supply cell type specific pointers for the reserved subregion, you can not supply cell type specific pointers for the normal subregions.

## Example

This example sets the pointer to display as a hand as shown in the figure above.

```csharp
private void Form1_Load(object sender, System.EventArgs e){
 // Change the pointer shape on column headers.
 fpSpread1.SetCursor(FarPoint.Win.Spread.CursorType.ColumnHeader, System.Windows.Forms.Cursors.Hand);
}
```

```vbnet
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
 ' Change the pointer shape on column headers.
 fpSpread1.SetCursor(FarPoint.Win.Spread.CursorType.ColumnHeader, System.Windows.Forms.Cursors.Hand)
End Sub
```

## See Also

[Customizing the Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance)
[Customizing the Dimensions of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontroldims)
[Customizing the Individual Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet)
[Customizing the Appearance of a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell)
[Customizing the Overall Component Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontrol)
[Creating and Applying a Style for Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-cellstyle)
[Using Conditional Formatting of Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-interact-condition)
[Customizing the User Interface Images](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-userimages)
[Using XP Themes with the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearxptheme)
[Customizing the Renderers](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rendcustom)
[Handling Right-to-Left Layouts](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rtlsupport)
[Customizing Painting of Parts of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appear-painting)
[Text Rendering with GDI](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-feattextrender)
[Applying Theme to Customize the Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-spreadthemeapply)
[Customizing the Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance)
[Customizing the Dimensions of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontroldims)
[Customizing the Individual Sheet Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet)
[Customizing the Appearance of a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcell)
[Customizing the Overall Component Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearcontrol)
[Creating and Applying a Style for Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-cellstyle)
[Using Conditional Formatting of Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-interact-condition)
[Customizing the User Interface Images](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-userimages)
[Using XP Themes with the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearxptheme)
[Customizing the Renderers](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rendcustom)
[Handling Right-to-Left Layouts](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-rtlsupport)
[Customizing Painting of Parts of the Component](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appear-painting)
[Text Rendering with GDI](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-feattextrender)
[Applying Theme to Customize the Appearance](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-spreadthemeapply)