Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Form layout and size of text field
Form layout and size of text field [message #273533] Thu, 07 October 2004 05:25 Go to next message
Eclipse UserFriend
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
Re: Form layout and size of text field [message #273717 is a reply to message #273533] Sat, 09 October 2004 16:43 Go to previous message
Eclipse UserFriend
> 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.

FormData.width was actually what I was looking for. I found it now.
Previous Topic:Using field editors in preference pages
Next Topic:Opening View in a new window
Goto Forum:
  


Current Time: Sat Jun 21 08:57:07 EDT 2025

Powered by FUDForum. Page generated in 0.06496 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top