[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] RowLayout pack seems not to work
|
Specifically, given this code snippet:
Composite buttons = new Composite(outer, SWT.LEFT);
{
RowLayout layout = new RowLayout(SWT.VERTICAL);
layout.marginTop = 0;
layout.marginBottom = 6;
buttons.setLayout(layout);
}
fNewButton = new Button(buttons, SWT.LEFT);
fNewButton.setText(Local.getString("New..."));
fEditButton = new Button(buttons, SWT.LEFT);
fEditButton.setText(Local.getString("Edit..."));
fRemoveButton = new Button(buttons, SWT.LEFT);
fRemoveButton.setText(Local.getString("Remove"));
What I get is three buttons stacked vertically, left justified, with three
different widths.
JavaDoc for RowLayout sez:
/**
* pack specifies whether all controls in the layout are forced
* to be the same size.
*
* The default value is true.
*/
I'm sure this is pilot error, but I don't see it. Thanks.
Bob