new wizard plugin: GUI problem [message #156450] |
Mon, 12 June 2006 11:26 |
Eclipse User |
|
|
|
Originally posted by: romich_n.mail.ru
Hello,
I have some trouble making a 2-page wizard appear the way I want it to.
Basically I have page 1 appear perfectly, with 2 groups with one under
another, but when I look at the second page it also has a group, but it
shouldn't (there's no code for a group at all). Basically all the fields
are located in a duplicate of second group from page 1 (Device).
Any thoughts?
Thanks
Here's my code:
page1:
public void createControl(Composite parent) {
Composite comp = new Composite(parent, SWT.NULL);
comp.setLayout(new FillLayout(SWT.VERTICAL));
Group container = new Group(comp, SWT.NULL);
container.setText("Application module");
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.verticalSpacing = 9;
container.setLayout(layout);
Label label1, label2, label3, label4, label5, label6;
label1 = new Label(container, SWT.NULL);
label1.setText("&Code:");
AMcode = new Text(container, SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
AMcode.setLayoutData(gd);
AMcode.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged();
}
});
label2 = new Label(container, SWT.NULL);
label2.setText("&Short description:");
ShortDesc = new Text(container, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
ShortDesc.setLayoutData(gd);
label3 = new Label(container, SWT.NULL);
label3.setText("&Vendor name:");
VendorName = new Text(container, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
VendorName.setLayoutData(gd);
label4 = new Label(container, SWT.NULL);
label4.setText("&Version:");
Ver = new Text(container, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
Ver.setLayoutData(gd);
label5 = new Label(container, SWT.NULL);
label5.setText("&Java package root:");
Root = new Text(container, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
Root.setLayoutData(gd);
Root.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged();
}
});
label6 = new Label(container, SWT.NULL);
label6.setText("&Java package:");
Pack = new Text(container, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
gd = new GridData(GridData.FILL_HORIZONTAL);
Pack.setLayoutData(gd);
Group container2 = new Group(comp, SWT.NULL);
container2.setText("Device");
GridLayout layout2 = new GridLayout();
layout2.numColumns = 2;
layout2.verticalSpacing = 9;
container2.setLayout(layout2);
Label label7, label8;
label7 = new Label(container2, SWT.NULL);
label7.setText("&Product name:");
Pname = new Text(container2, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
Pname.setLayoutData(gd);
label8 = new Label(container2, SWT.NULL);
label8.setText("&Product version:");
Pver = new Text(container2, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
Pver.setLayoutData(gd);
initialize();
dialogChanged();
setControl(container);
}
page 2:
public void createControl(Composite parent) {
Composite comp2 = new Composite(parent, SWT.NULL);
comp2.setLayout(new FillLayout(SWT.VERTICAL));
Composite container3 = new Composite(comp2, SWT.NULL);
GridLayout layout3 = new GridLayout();
container3.setLayout(layout3);
layout3.numColumns = 3;
layout3.verticalSpacing = 9;
Label label = new Label(container3, SWT.NULL);
label.setText("&Container #2:");
containerText = new Text(container3, SWT.BORDER | SWT.SINGLE);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
containerText.setLayoutData(gd);
containerText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged();
}
});
Button button = new Button(container3, SWT.PUSH);
button.setText("Browse...");
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleBrowse();
}
});
label = new Label(container3, SWT.NULL);
label.setText("&File name:");
fileText = new Text(container3, SWT.BORDER | SWT.SINGLE);
gd = new GridData(GridData.FILL_HORIZONTAL);
fileText.setLayoutData(gd);
fileText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
dialogChanged();
}
});
initialize();
dialogChanged();
setControl(container3);
}
|
|
|
Powered by
FUDForum. Page generated in 0.09737 seconds