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?
Thanks,
Jose
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
-Graeme
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
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?
Thanks,
Jose
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.
-Graeme
Hi Graeme,
Thanks for the answer! I'll give this workaround a try :-)
Thanks,
Jose
Hi again,
Graeme, your workaround certainly work, at least as far as I've tested it. Thanks!
Jose