This sometimes happens to me when I have a Composite embeded in another
GridLayout Composite.. is the "parent" in this method also using a
GridLayout? You might wanna try panel.setLayoutData(GridData.FILL_BOTH) ?
On 10/27/06, Max Rydahl Andersen <max.andersen(a)jboss.com> wrote:
Hi,
I'm going crazy how hard it is to put a combobox in a toolbar in eclipse
without it looking bad.
See the attached snapshot where the lower border/pixels of the comboboxes
are missing.
Anyone who got an idea how to make this work !?
here is the relevant code in a subclass of ControlContribution:
protected Control createControl(Composite parent) {
Composite panel = new Composite( parent, SWT.NONE );
panel.setLayout( new GridLayout(2,false) );
if(getLabelText()!=null) {
Label label = new Label(panel, SWT.None);
label.setText(getLabelText());
GridData gd = new GridData();
gd.horizontalSpan = 1;
gd.verticalAlignment = GridData.BEGINNING;
gd.horizontalAlignment = GridData.END;
}
comboControl = new Combo( panel, SWT.DROP_DOWN |
(isReadOnly()?SWT.READ_ONLY:SWT.NONE) );
GridData gd = new GridData();
gd.grabExcessHorizontalSpace = true;
gd.widthHint = getComboWidth();
gd.verticalAlignment = GridData.CENTER;
gd.horizontalAlignment = GridData.END;
comboControl.setLayoutData( gd );
populateComboBox( comboControl );
if(getSelectionAdapter()!=null) {
comboControl.addSelectionListener(
getSelectionAdapter() );
}
return panel;
}
--
--
Max Rydahl Andersen
callto://max.rydahl.andersen
Hibernate
max(a)hibernate.org
http://hibernate.org
JBoss a division of Red Hat
max.andersen(a)jboss.com
_______________________________________________
jbosside-dev mailing list
jbosside-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosside-dev
--
Marshall Culpepper
marshall.culpepper(a)jboss.com
JBossIDE Team Lead
JBoss, a division of Red Hat