Project: SWT
Bug 90282 SWT.RIGHT not working on Text control on Mac OS X
Reported: 2005-04-05 08:50:37 | Status: resolved fixed

On Mac OS X 10.3 it is not possible to have right aligned text within a Text control (AKA text field). This works on Windows XP and Linux GTK, however, I don't know anything about Carbon, so this might just be unsupported. Here's a small snippet showing the problem: public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); Text text = new Text(shell, SWT.SINGLE | SWT.BORDER | SWT.RIGHT); text.setBounds(10, 10, 200, 25); text.setText("right aligned?"); shell.setBounds(50, 50, 230, 100); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } I'm sorry if this is a dup, couldn't find a bug. Tested with Eclipse 3.1M6.

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