> For the complete documentation index, see [llms.txt](https://docs.saabytes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saabytes.com/controls/saascrollbar.md).

# SaaScrollBar

{% hint style="warning" %}
This documentation is for SaaUI 1.1.0. If you using older version please update to latest version.
{% endhint %}

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MeLJp7jLxK-XmIvfxh3%2Fuploads%2FtBRngA14oYXMmrwQet4F%2Fimage.png?alt=media\&token=735c6bcc-16b8-48a6-a4fd-bd3b8ed54c2a)

## 1. Colors

`ActiveBackgroundColor` tells the background color of the scrollbar when the mouse pointer is over the non-thumb area.

`ActiveColor` tells color of the thumb color when mouse pointer is over the thumb.

`BackgroundColor` tells background color of the scrollbar.

`ClickedBackgroundColor` tells background color of the scrollbar when clicked non-thumb area.

`ClickedColor` tells color of the thumb when the thumb is clicked.

`Color` tells color of the thumb of the scrollbar.

## 2. Binding and Styles

`RoundedStyle` tells whether the scrollbar edges are rounded.

`TargetControl` tells the control that this scrollbar will be associated with. Once you set the target control, the scrollbar will automatically bind itself to the control.

`Vertical` tells whether the scrollbar is vertical or horizontal.

`HorizontalScrollBarNeeded` returns whether horizontal scrollbar is needed. This means if the owning control (container) needs horizontal scrollbar to display its contents.

`VerticalScrollBarNeeded` returns whether vertical scrollbar is needed. This means if the owning control (container) needs vertical scrollbar to display its contents.

{% hint style="info" %}
You can use **`HorizontalScrollBarNeeded`** & **`VerticalScrollBarNeeded`** to determine when you need to show scrollbar. You can use **`ScrollBarNeeded`** event which fires both when the control needs scrollbar(s) and when it doesn't need scrollbar(s).
{% endhint %}

`MouseWheelScroll` tells whether the mouse wheel will scroll the scrollbar.

{% hint style="info" %}
If **`MouseWheelScroll`** is set **true**, then the mousewheel will tricker SaaScrollbar to scroll up/down/left/right. if your control uses two or more SaaScrollbars like horizontal and vertical, the mousewheel will scroll the scrollbar which the mouse pointer is over. But if the mouse pointer is over the control itself instead of the scrollbars then the mousewheel will scroll the vertical scrollbar.
{% endhint %}

## 3. Values

`Change` tells amount the scrollbar increments or decrements when non-thumb area is clicked or clicked and hold. '0' means no change.

`Maximum` tells the maximum value the scrollbar will accept.

`Minimum` tells the minimum value the scrollbar will accept.

`Value` tells the current position of the scrollbar.

## 4. Events

`ScrollChanged` fires when the `Value` of the scrollbar is changed.

`ScrollBarNeeded` Fires both when the control owning the scrollbar needs scrollbar(s) to be shown (becomes scrollable) and when it does not need scrollbar(s). Use "`VerticalScrollBarNeeded`" and "`HorizontalScrollBarNeeded`" properties to know which scrollbar is needed.

{% hint style="info" %}
If your control (container) uses more than one SaaScrollBar like vertical and horizontal scrollbars, you don't need to attach this event to all of them. Only attach to one scrollbar and use "**`VerticalScrollBarNeeded`**" and "**`HorizontalScrollBarNeeded`**" properties to know which scrollbar is needed.
{% endhint %}
