Community
Participate
Working Groups
Running the following Snippet, a Text and a Combo widget are shown in a GridLayout side by side. Both are vertically centered, but the Text widget begins at the same vertical position as the Combo, although the Combo is bigger in height. I checked the same Snippet on Windows, and there the Text widget is positioned exactly between the Combo (=centered vertically). public class Main { public static void main(String[] args) { System.setProperty("org.eclipse.swt.internal.carbon.noFocusRing", "true"); Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout(1, false)); Composite c = new Composite(shell, SWT.BORDER); c.setLayout(new GridLayout(2, true)); c.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); Text t = new Text(c, SWT.BORDER); t.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); Combo co = new Combo(c, SWT.NONE); co.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); co.add("Hallo"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } } } Note that the blue focusring was removed with a System Property. Not sure, but maybe the removal is not taken into account when the preferred size is calculated? Ben
I could not reproduce this anymore. Please reopen if you still see the problem.