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:

Marko Zivkovic
SQL Server Management Studio (SSMS)

About Marko Zivkovic

Marko aka “Zivko” is a senior software analyst from Nis, Serbia focusing on SQL Server and MySQL as well as client technologies like SSMS, Visual Studio, and VSCode. He has extensive experience with quality assurance, issue escalation/resolution, and product evangelism. He is a prolific author of authoritative content related to SQL Server including a number of “platinum” articles (top 1% in terms of popularity and engagement). His writing covers a range of topics on MySQL and SQL Server including remote/linked servers, import/export, LocalDB, SSMS, and more. In his part-time, Zivko likes basketball, foosball (table-soccer), and rock music. See more about Marko at LinkedIn View all posts by Marko Zivkovic

168 Views