Click here to Skip to main content
15,886,518 members
Articles / Database Development / SQL Server / SQL Server 2016
Tip/Trick

SSMS 2016: Enhanced Scrollbar

Rate me:
Please Sign up or sign in to vote.
3.76/5 (5 votes)
5 Sep 2016CPOL4 min read 12.5K   3   2
Detailed description with screenshots of the enhanced scroll bar introduced in SSMS (SQL Server Management Studio) 2016

Introduction

It’s not new to developers who prefer to develop their application using probably the world’s most advanced IDE, Visual Studio. Now, if you have already noticed the splash screen that appears at the time of opening SSMS, you might have seen the bottom line “Powered by Visual Studio”. It means one should not be surprised to see the IDE features of Visual Studio are making their way to SSMS gradually as SSMS is now built upon the Visual Studio Isolated Shell.

Image 1

Figure 1

Enhanced Vertical Scroll Bar

Let's quickly have a look at how the vertical scroll bar looks like if configured to different sizes.

Image 2

Figure 2

Now that you have seen a glimpse of how the vertical scroll bar in SSMS looks like, let’s get into the details of these views and make the most of these features.

Follow these steps to open the configuration window:

Tools > Options > Text Editor > All Languages > Scroll Bars

Image 3

Figure 3

Before we discuss further, let’s understand what Annotation means.

Annotations: In SSMS, annotations on the vertical scroll bar are the visual indications/symbols to have a bird eye view of the change made to the current query window. These are small color markers on the vertical scroll bar indicating various things like breakpoint, current caret position, errors, code changes, etc. You can easily navigate to these positions of your query by scrolling down to the marked positions. This feature is particularly very helpful when you are writing/editing a long query/stored proc/function, etc.

You can hide/show the horizontal and vertical scroll bars using the first two checkboxes in this screen. Then there are two distinct sections, i.e., Display & Behavior. The Display section is all about customizing what annotations you want to show or hide on the vertical scroll bar. The default is all the annotations are enabled. The second section, i.e., Behavior section is about configuring different behaviors of the scroll bar such as width, mode, etc.

Let’s understand what each of these elements are for:

(Note: The number in the numbered list corresponds to the number in the above picture, i.e., Figure 2.)

Image 4

  1. Show annotations over vertical scroll bar: By default, this and all its sub elements are set to show on the scroll bar in SSMS 2016. So, without making any changes, you should be able to see these color marks. Unchecking it will disable all the annotations on the scroll bar.

  2. Show changes: When this is enabled, you should be able to track the changes done, i.e., which portion of the query is saved and which portion has been changed after the last save. You may refer to the image on the right side where the green colored portion marked with “a” is the section which is already saved and the portion with yellow color and marked by “b” is the potion which is changed after the last save.

  3. Show Marks: Shows the marks for breakpoints and bookmarks when enabled as shown in the above image marked with “c” in maroon color indicating the breakpoint while “d” in black color is the indication of position of the bookmark.

  4. Show Errors: It indicates the positions of the errors, if any in the current query window. The red colored mark, “e” is an example of such.

  5. Show caret position: Shows the current position of the caret marked as a single horizontal line over the vertical scroll bar in the above image as “f”.

  6. Use bar mode for vertical scroll bar: This is the default behavior you will see in SSMS. This is the old vertical scroll bar with annotations.   

  7. Use map mode for vertical scroll bar: With this mode, you can customize the vertical scroll bar to different width and can preview the code by just hovering over the vertical scroll bar.

  8. Show Preview Tooltip: Image 5When this is enabled, you will be able to preview the code like a tooltip when you hover the mouse pointer over the vertical scroll bar at the respective positions as the image on the right side.

  9. Source Overview: You can see the code overview on the scroll bar by customizing the width to the following available options as shown in Figure 2:

    1. Off
    2. Narrow
    3. Medium
    4. Wide

Conclusion

Hope this little tip on SSMS will be a great weapon on your arsenal. Please share your valuable thoughts on this.

Thanks for reading!

History

  • 5th September, 2016: First published

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
General[My vote of 2] Broken images? Pin
Petoj874-Sep-16 21:52
Petoj874-Sep-16 21:52 
AnswerRe: [My vote of 2] Broken images? Pin
Suvendu Shekhar Giri4-Sep-16 22:10
professionalSuvendu Shekhar Giri4-Sep-16 22:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.