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

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

9.7. Controlling Sizing of Widgets with RowLayout

Another useful setting of RowLayout is pack. pack controls the initial sizing of widgets placed in the container. A setting of true allows RowLayout to create widgets of different sizes, depending on the widget type and the text setting of the widgets. The effect is seen in Figure 9-4, where each widget has a different size. The size of the Button widgets is controlled by the text each contains, hence the Cancel button is larger than the OK button.

Your interface design may require that you force all widgets in a row to be the same size, no matter what their style or contents.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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