I'd like to not have scroll bars in my table. What I do is to not have a viewport layer, since is the layer that adds the scrolling funcionallity, and it is true that I don't have scrolling, but the scroll bars appear as disabled. Do you know how to get rid of them?
The scrollbars are on the NatTable intself (Scrollable interface). If you are not using a ViewportLayer you can call natTable.getVerticalBar().setVisible(false), natTable.getHorizontalBar().setVisible(false); That will hopefully work for you.
The ViewportLayer only enables the scrollbars. They are disabled by default.
NatTable can be constructed with an optional style, if you don't include the SWT.VERTICAL/HORIZONTAL scrollbars a null pointer exception is thrown when NatTable tries to disable the scrollbars. I think that's a bug.
Hopefully the above workaround will get you what you need.
Thanks for the answer! I'll give this workaround a try :-)
Graeme, your workaround certainly work, at least as far as I've tested it. Thanks!
Log in to post a comment.