Skip to content
Advertisement

Java SWT make a Label Scrollable

I have a Label in a Group in SWT and if it contains many lines of text, I would like to make it scrollable vertically. Setting the style parameter with SWT.V_SCROLL doesn’t seem to do it. How can I do this?

Advertisement

Answer

Label does not support scrolling.

You could use a read only Text control which will scroll:

Text text = new Text(parent, SWT.READ_ONLY | SWT.V_SCROLL);
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement