# ScrollBar

A set of methods for setting and retrieving the editor's scrollbar.

### Constructors

- - new ScrollBar(DOMElement parent)

Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.

Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.

#### Arguments

parent | DOMElement | Required. A DOM element

### Events

- - ScrollBar.on("scroll", function( Object e))

Emitted when the scroll bar, well, scrolls.

Emitted when the scroll bar, well, scrolls.

#### Arguments

e | Object | Required. Contains one property, `"data"`, which indicates the current scroll top position

### Methods

- - ScrollBar.getWidth()
  - - Number

Returns the width of the scroll bar.

Returns the width of the scroll bar.

- - ScrollBar.onScroll()
  - Undocumented

- - ScrollBar.setHeight(Number height)

Sets the height of the scroll bar, in pixels.

Sets the height of the scroll bar, in pixels.

#### Arguments

height | Number | Required. The new height

- - ScrollBar.setInnerHeight(Number height)

Sets the inner height of the scroll bar, in pixels.

Sets the inner height of the scroll bar, in pixels.

#### Arguments

height | Number | Required. The new inner height

- - ScrollBar.setScrollTop(Number scrollTop)

Sets the scroll top of the scroll bar.

Sets the scroll top of the scroll bar.

#### Arguments

scrollTop | Number | Required. The new scroll top