Marko Zivkovic

New feature in SQL Server Management Studio 2016 – Scroll bar

June 20, 2016 by

One of the new enhancements in SQL Server Management Studio 2016 (SSMS) is the Scroll Bars tab, in which can be set various of settings for vertical scroll bar.

In the older versions of SSMS the only scroll bar settings that can be set is to turn on/off the horizontal and/or vertical scroll bar. These options were located in the General tab under the Text Editor node in the Options window:

SSMS 2016 provides many more options related to the vertical scroll bar:

To open the Scroll Bars tab, go to the Tools menu, choose the Options command. In the Options window that appears, select the All Languages node, which is under the Text Editor node. In the All Languages node among others tabs will appear the Scroll Bars tab:

Another way to open the Scroll Bars tab is via vertical scroll bar in the query window. Right-click on the vertical scroll bar and from the popup menu, choose the Scroll Bar Options:

The first two options in the Scroll Bars tab are for turning on/off the horizontal/vertical scroll bars in the query window. By default, these two options are turned on:

Display

The Display section allows turning on/off annotations, which will be shown throughout the entire script within the vertical scroll bar:

There are four annotations that can occur on the vertical scroll bar:

Every annotation has its own color with which appears on the vertical scroll bar.

The Show changes annotation tracks all changes in the script. The Show changes annotation has two color yellow and the green for tracking changes. The green color indicates that none changes were made in the script:

If some changes were made in the script a yellow color will appear on the vertical scroll bar indicates where the changes occur:

The Show marks shows locations of the breakpoints in the script and purple square will appear on the vertical bar:

The Show errors shows locations in the script where syntax errors occur and in the vertical scroll bar will be shown as a red square:

The Show caret position displays the current location of the cursor in relation to the entire script. The Show caret position is displayed as a blue horizontal line in the vertical scroll bar:

The vertical scroll bar has two modes which are located in the Behavior section:

By default, the Use bar mode for vertical scroll bar is enabled when SSMS is installed. The bar mode displays annotation on the scroll bar as shown in the images above. To preview code with the vertical scroll bar, the mode must be changed to Use map mode for vertical scroll bar:

There are four options to control the width of the scroll bar and are located under the Source Overview combo box:

Here how the vertical scroll bar looks like when choose one of the options from the Source Overview:

When the Use map mode for vertical scroll bar is active, the annotations will be displayed as well.

With the Show Preview Tooltip option under the Behavior section:

The code preview that appears when hover over the portion of the vertical scroll bar can be turned off/on:

Another improvement is the Scroll Here option. Right click on the desired location in the vertical scroll bar and from the popup menu choose the Scroll Here option:

The chosen location will be displayed:

See more

To boost your SQL Server development productivity, check out Free SQL Server Management Studio add-ins.

Further reading


Marko Zivkovic

Marko Zivkovic

Marko is a Mechanical engineer, who likes to play basketball, foosball (table-soccer) and listen to rock music. He is interested in SQL code, PHP development, HTML and CSS techniques.

Currently working for ApexSQL LLC as a Software Sales Engineer, he is helping customers with any technical issues and does quality assurance for ApexSQL Complete, ApexSQL Refactor and ApexSQL Search free add-ins.

View all posts by Marko Zivkovic
Marko Zivkovic
SQL Server Management Studio

About Marko Zivkovic

Marko is a Mechanical engineer, who likes to play basketball, foosball (table-soccer) and listen to rock music. He is interested in SQL code, PHP development, HTML and CSS techniques. Currently working for ApexSQL LLC as a Software Sales Engineer, he is helping customers with any technical issues and does quality assurance for ApexSQL Complete, ApexSQL Refactor and ApexSQL Search free add-ins. View all posts by Marko Zivkovic

2,446 Views