mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Env edit dialog size adjust
This commit is contained in:
parent
7ddd1fafe1
commit
a681729447
2 changed files with 11 additions and 3 deletions
|
@ -72,6 +72,7 @@ public class EnvDialog extends Dialog {
|
|||
text1 = new Text(c, SWT.SINGLE | SWT.BORDER);
|
||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalSpan = 2;
|
||||
gd.widthHint = 400;
|
||||
text1.setLayoutData(gd);
|
||||
text1.addModifyListener(new ModifyListener () {
|
||||
public void modifyText(ModifyEvent e) { setButtons(); }});
|
||||
|
@ -81,7 +82,9 @@ public class EnvDialog extends Dialog {
|
|||
l2.setLayoutData(new GridData(GridData.BEGINNING));
|
||||
|
||||
text2 = new Text(c, SWT.SINGLE | SWT.BORDER);
|
||||
text2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.widthHint = 250;
|
||||
text2.setLayoutData(gd);
|
||||
text2.addModifyListener(new ModifyListener () {
|
||||
public void modifyText(ModifyEvent e) { setButtons(); }});
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.eclipse.jface.window.Window;
|
|||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
@ -147,9 +148,13 @@ public class EnvironmentTab extends AbstractCPropertyTab {
|
|||
table = new Table(usercomp, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.H_SCROLL | SWT.FULL_SELECTION);
|
||||
table.setHeaderVisible(true);
|
||||
table.setLinesVisible(true);
|
||||
table.addSelectionListener(new SelectionAdapter() {
|
||||
table.addSelectionListener(new SelectionListener() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
updateButtons();
|
||||
}
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
if (buttonIsEnabled(2) && table.getSelectionIndex() != -1)
|
||||
buttonPressed(2);
|
||||
}});
|
||||
|
||||
tv = new TableViewer(table);
|
||||
|
|
Loading…
Add table
Reference in a new issue