Skip to content

Commit 517a657

Browse files
committed
Fixed Griddata
1 parent 45468ef commit 517a657

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • de.vogella.rcp.intro.dialogs.custom/src/de/vogella/rcp/intro/dialogs/custom/dialogs

‎de.vogella.rcp.intro.dialogs.custom/src/de/vogella/rcp/intro/dialogs/custom/dialogs/MyDialog.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,13 @@ protected Control createDialogArea(Composite parent) {
5353

5454
firstNameText = new Text(parent, SWT.BORDER);
5555
firstNameText.setLayoutData(gridData);
56+
5657
Label label2 = new Label(parent, SWT.NONE);
5758
label2.setText("Last Name");
59+
// You should not re-use GridData
60+
gridData = new GridData();
61+
gridData.grabExcessHorizontalSpace = true;
62+
gridData.horizontalAlignment = GridData.FILL;
5863
lastNameText = new Text(parent, SWT.BORDER);
5964
lastNameText.setLayoutData(gridData);
6065
return parent;

0 commit comments

Comments
 (0)