The simple answer is: "No".
If you create the ScrolledComposite
without SWT.H_SCROLL
or SWT.V_SCROLL
, it cannot be scrolled, i.e. calling setOrigin(Point)
or related methods simply won't do anything.
If on the other hand, you enable scrollbars, but want to hide them, the OS will just override your decision. The scroll bars are controlled by the OS, meaning that the OS will decide if they are visible or not. Calling setVisible(false)
on a ScrollBar
is nothing more than a hint to the OS. It might follow it or not...
Sorry to be the bearer of bad news :\
You could try wrapping the ScrolledComposite
in another Composite
and forcing this one to "crop" the scrollbar of the contained ScrolledComposite
(by changing its size), but this is more of a hack.