Reputation: 6009
I have Label in SWT The text is
"Doctor\ntest\ttest2"
I want to change it to
"Doctor
test test2"
menaing to change the \n to new line and \t to tab. Can I do it in Label in SWT? Do I need to change the control ?
Upvotes: 0
Views: 1138
Reputation: 3016
You can do this in the label control.
final Label label = new Label(composite, SWT.NULL );
label.setText( "Line one \n line two abc \t tabbed" );
label.pack();
Results in:
You can also do this by using a Text-Control and set it disabled.
Upvotes: 2