Community
Participate
Working Groups
Bugzilla – Bug 28503
Can not indent text in a Label
Last modified: 2002-12-18 10:18:05 EST
There's no way to indent text in a label. This is necessary for displaying labels in the table.
You can do either of the following: - place the Label widget where it should really go, so no indenting required - prefix your string with spaces or "\t". eg.- public class Main { public static void main(String[] args) { Display d = Display.getDefault(); Shell shell = new Shell(d); shell.setSize(800, 200); Label label = new Label(shell,SWT.BORDER); label.setBounds(10,10,100,20); label.setText("\ttext"); shell.open(); while (!shell.isDisposed()) { if (!d.readAndDispatch()) { d.sleep(); } }; } }