GNU Emacs Manual - Scroll Bars

Go to the first, previous, next, last section, table of contents.

## Scroll Bars

When using X, Emacs normally makes a scroll bar at the left of each Emacs window. The scroll bar runs the height of the window, and shows a moving rectangular inner box which represents the portion of the buffer currently displayed. The entire height of the scroll bar represents the entire length of the buffer.

You can use `Mouse-2` (normally, the middle button) in the scroll bar to move or drag the inner box up and down. If you move it to the top of the scroll bar, you see the top of the buffer. If you move it to the bottom of the scroll bar, you see the bottom of the buffer.

The left and right buttons in the scroll bar scroll by controlled increments. `Mouse-1` (normally, the left button) moves the line at the level where you click up to the top of the window. `Mouse-3` (normally, the right button) moves the line at the top of the window down to the level where you click. By clicking repeatedly in the same place, you can scroll by the same distance over and over.

Aside from scrolling, you can also click `C-Mouse-2` in the scroll bar to split a window vertically. The split occurs on the line where you click.

You can enable or disable Scroll Bar mode with the command `M-x scroll-bar-mode`. With no argument, it toggles the use of scroll bars. With an argument, it turns use of scroll bars on if and only if the argument is positive. This command applies to all frames, including frames yet to be created. You can use the X resource ``verticalScrollBars'` to control the initial setting of Scroll Bar mode. See section X Resources.

To enable or disable scroll bars for just the selected frame, use the `M-x toggle-scroll-bar` command.

Go to the first, previous, next, last section, table of contents.