Project: SWT
Bug 102088 Text with CENTER has too much logical space
Reported: 2005-06-28 16:20:53 | Status: resolved fixed

3.1 - run the snippet below - the Text shows a horizontal scrollbar that's scrolled to the end, even though the string does not exceed the width of the Text widget - there's also a small strip of cheese near the left edge of the horizontal scrollbar public static void main (String[] args) { String string = "The quick brown fox jumped over the lazy dog.\nOne two three"; final Display display = new Display(); final Shell shell = new Shell(display); shell.setBounds(10,10,400,300); Text text = new Text(shell, SWT.MULTI | SWT.CENTER | SWT.H_SCROLL); text.setBounds(10,10,380,100); text.setText(string); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java