Scrolling

Often a window may not be large enough to display all the information available. For example, in Version 1 of ScrollDemo in the previous section, if the window is made small, you will not be able to see all the lines of text displayed at the same time. In such a situation it is useful for the user to be able to scroll the output to view additional information. The standard way Windows handles this situation is to provide horizontal and vertical scrollbars. Version 2 of ScrollDemo adds scrolling capability to our program, as illustrated in Figure 11-12.

Figure 11-12. Scrollbars enable user to view multiple lines of text.

The .NET Framework ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.