# Displaying Scroll Bars

Learn how you can customize how and if to display the scroll bars in the Spread for ASP.NET component. Learn more in documentation.

## Content

You can customize how and if to display the scroll bars in the component. You can display the individual scroll bars (horizontal or vertical) only when needed, as shown in the figure.
![Scroll Bars](https://cdn.mescius.io/document-site-files/images/346c9178-0ed8-4fb9-908b-1565b22fb408/artwork/partsofscrollbars.png)

## Using the Properties Window

1. Select the FpSpread component.
2. With the **Properties** window open, select the **HorizontalScrollBarPolicy** property and **VerticalScrollBarPolicy** (under the **Behavior** category) and from the drop-down list, select a value for each.
3. The scroll bar policy is now set.

## Using Code

Determine when to display the scroll bars by setting the [HorizontalScrollBarPolicy](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.HorizontalScrollBarPolicy.html) property and [VerticalScrollBarPolicy](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.VerticalScrollBarPolicy.html) property for the [FpSpread](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.html) component and the settings of the [ScrollBarPolicy](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.ScrollBarPolicy.html) enumeration.

## Example

The following example sets the horizontal and vertical scroll bar policies.

```csharp
FpSpread1.HorizontalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.Always;
FpSpread1.VerticalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.AsNeeded;
```

```vbnet
FpSpread1.HorizontalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.Always
FpSpread1.VerticalScrollBarPolicy = FarPoint.Web.Spread.ScrollBarPolicy.AsNeeded
```

## Using the Spread Designer

1. Select the **Settings** menu.
2. Select the **Scrollbar** icon under the **Spread Settings** section.
3. Set the policy options.
4. Click **OK** to apply the changes.
5. Click **Apply and Exit** to close the Spread Designer.