• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. SWT Text Fields > Adding Scrollbars

5.11. Adding Scrollbars

If you completely fill a text field, the text begins to disappear from the top. It's still there, but it's just not visible—you can access it by using the up arrow on the keyboard to move back toward the top. Still, users expect not to have to resort to the arrow keys to navigate a text field. To cure this problem, you need to add a scrollbar to your text field.

5.11.1. How do I do that?

There are two types of scrollbars—horizontal and vertical. Which type you use depends upon which way you want to allow scrolling. Since a horizontal scrollbar isn't necessary with the WRAP style used in Example 5-3, a vertical scrollbar is what's required.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint