Scrollbars is an effective tool that novices to advanced users use every day without appreciating its effectiveness and usefulness. Various vendors have evolved its design including its position in an application, workflow with gestures and even visibility. Microsoft had re-engineered its use in Visual Studio that many end-users are not aware of and therefore it seems to be an under-utilized feature.
A typical screen in Visual Studio looks like below with scroll bar on the right to browse through the page up or down.
What many people don’t realize is that you can configure to use your scroll bar more effectively. Right clicking on scrollbar will bring the following context-menu.
Clicking upon the “Scroll Bar Options” will bring up following dialog. You can also get to the same dialog by clicking on Tool->Options also. Under the Behavior section, current setting is set to “Use bar mode for vertical scroll bar”.
Let’s change it to select “Use map mode for vertical scroll bar”. Let’s stick with other options of Source Preview Tooltip as checked with Source Overview set to Off.
Clicking on OK button here will make some adjustments to scroll bar . Most visible change will be that the scroll bar thumb may look a little bigger. However, if you hover mouse over the anywhere in the scroll bar, it will bring up a tooltip that will provide code preview of that area. This is useful in large code files where you can get a quick preview without losing the areas where you are currently working on.
Let’s go back to the scroll box options and see what else it can offer with other settings. Let’s change the Source view to Narrow now.
With this setting, now you get a quick preview of code within the Scroll bar as shown below.
It's certainly not easily readable but that tooltip is still there. You can change the Source Overview Size. With Medium, the source preview with scroll bar looks as follows:
Whereas with a Wide Source overview, it looks as follows:
May not be most favorite tool for everyone, but at least be aware that this is something available, if needed.
Until next, happy debugging!!
Filed under: CodeProject, General