Bug 146265 [FieldAssist] Problems with vertical filled control
When using text with fill vertical, the text of the decorated field will not fill all the space. DecoratedField decoNormal = new DecoratedField(shell, SWT.BORDER, new TextControlCreator()); FieldDecoration fieldDeco = FieldDecorationRegistry.getDefault(). getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL); decoNormal.addFieldDecoration(fieldDeco, SWT.TOP | SWT.LEFT, false); decoNormal.getLayoutControl().setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, true) ); If i do this trick it will work but it is not a good practice i think : FormData fieldData = (FormData)decoVerticalFilled.getControl().getLayoutData(); fieldData.bottom = new FormAttachment(100, 0); decoVerticalFilled.getControl().setLayoutData(fieldData); Regards
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/DecoratedField.java
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/**
 * DecoratedField manages image decorations around a control. It allows clients
 * to specify an image decoration and a position for the decoration relative to
 * the field. Decorations may be assigned descriptions, which are shown when the
 * user hovers over the decoration. Clients can decorate any kind of control by
 * supplying a {@link IControlCreator} to create the control that is decorated.
 * <p>
 * Decorations always appear on either horizontal side of the field, never above
 * or below it. Decorations can be positioned at the top or bottom of either
 * side. Future implementations may provide additional positioning options for
 * decorations.
 * <p>
 * By default, DecoratedField will consult the {@link FieldDecorationRegistry}
 * to determine how much space should be reserved for each decoration. This
 * allows fields with decorations from different sources to align properly on
 * the same dialog, since the registry tracks the size of all decorations
 * registered. Therefore, it is recommended, but not required, that clients of
 * DecoratedField register the decorations used. In cases where alignment
 * between different fields is not a concern, clients can use