|
Re: label being cut off in wizard [message #461912 is a reply to message #461902] |
Tue, 04 October 2005 13:58 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
What's the entire griddata used for both the label and the entry field
that is to the right of the label?
Did you supply width hints for the label? If you did, remove them. They
override the preferred size returned from the text.
--
Thanks,
Rich Kulp
|
|
|
Re: label being cut off in wizard [message #462003 is a reply to message #461912] |
Tue, 04 October 2005 23:00 |
Sachin Patel Messages: 75 Registered: July 2009 |
Member |
|
|
Woops, the following reply didn't get sent to the mailing list...
No I didn't supply any hints. Below is the code for the group....
Group group = new Group(composite, SWT.NONE);
group.setText(Messages.dependencyGroupLabel);
group.setLayoutData(data);
group.setLayout(layout);
Button button = new Button(group, SWT.LEFT | SWT.RADIO);
button.setSelection(true);
button.setText(Messages.serverRepos);
button.setLayoutData(data);
Label label = new Label(group, SWT.LEFT);
label.setText(Messages.uri);
GridData labelData = new
GridData(GridData.HORIZONTAL_ALIGN_FILL);
labelData.grabExcessHorizontalSpace = true;
labelData.horizontalIndent = 20;
label.setLayoutData(labelData);
Text text = new Text(group, SWT.SINGLE | SWT.BORDER);
text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Button button2 = new Button(group, SWT.LEFT | SWT.RADIO);
button2.setSelection(false);
button2.setText(Messages.mavenArtifact);
button2.setLayoutData(data);
Label groupIdLabel = new Label(group, SWT.LEFT);
groupIdLabel.setText(Messages.groupId);
groupIdLabel.setLayoutData(labelData);
Text groupIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
groupIdText.setLayoutData(new
GridData(GridData.FILL_HORIZONTAL));
Label artifactIdLabel = new Label(group, SWT.LEFT);
artifactIdLabel.setText(Messages.artifactId);
artifactIdLabel.setLayoutData(labelData);
Text artifactIdText = new Text(group, SWT.SINGLE | SWT.BORDER);
artifactIdText
.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label versionLabel = new Label(group, SWT.LEFT);
versionLabel.setText(Messages.version);
versionLabel.setLayoutData(labelData);
Text versionText = new Text(group, SWT.SINGLE | SWT.BORDER);
versionText.setLayoutData(new
GridData(GridData.FILL_HORIZONTAL));
Rich Kulp wrote:
> What's the entire griddata used for both the label and the entry field
> that is to the right of the label?
>
> Did you supply width hints for the label? If you did, remove them. They
> override the preferred size returned from the text.
|
|
|
Re: label being cut off in wizard [message #462076 is a reply to message #462003] |
Wed, 05 October 2005 19:07 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
You can't reuse Griddata. You must supply a brand new instance for each
control. The control doesn't make a copy of the griddata, it actually
keeps a reference to it and actually modifies it itself.
So all reuse of Griddata needs to be changed to a new instance for each.
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.04023 seconds