Form layout and size of text field [message #273533] |
Thu, 07 October 2004 05:25  |
Eclipse User |
|
|
|
Originally posted by: christian.hauser.dvbern.ch
Hello everybody
I have a WizardPage that displays some labels and text fields. I'm using
the FormLayout. However, I cannot set the width of the Text controls.
This causes the text fields to have different widths. The width depends
on what text is initially set to the Text control.
public class FormPageInitial extends WizardPage {
...
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
FormLayout layout = new FormLayout();
container.setLayout(layout);
...
Text text = new Text(container, SWT.SINGLE | SWT.BORDER);
text.setText("This text's length will affect the width");
...
}
}
Could anyone help me, please? I'd like to set the width of the Text
control to be fix. No matter what text is set to it.
Thanks in advance for any hints.
Christian
|
|
|
|
Powered by
FUDForum. Page generated in 0.06496 seconds