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

Chapter 9. SWT Layouts > Controlling Wrapping of Widgets with RowLayout

9.6. Controlling Wrapping of Widgets with RowLayout

RowLayout is more complex than FillLayout and, consequently, you must manage some additional settings to achieve the desired effect. One such setting—wrap—controls whether widgets will wrap down to a second row if the container is resized so that the widgets no longer fit on a single row. The default behavior, seen in the preceding example, is to wrap widgets; however, there are times when your interface design won't permit wrapping and you must then alter the default RowLayout behavior.

9.6.1. How do I do that?

The row-wrapping feature that is the default for RowLayout can easily be switched off if you want a different effect. The following code creates a RowLayout in which wrapping does not take place:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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