I agree that you probably can't get the scroll alone, but I worked with it with Canvas (or ScrolledComposite) and then set the contents of this composite text to the exact same size as ScrolledComposite.getClientArea (). This may require a little tweaking, and you need to make sure that the content component changes with ScrolledComposite, but should be possible.
You can then get the ScrolledComposite scrollbars and use them independently of the ScrolledComposite.
source
share