ankurtr ankurtr - 6 months ago 18
Java Question

How to disable horizontal scroll bars in the swt table?

To disable vertical scroll bar i used the following syntax

table.getHorizontalBar().setEnabled(false);


But it is not working. It is ruining my application ui. How can i disable it?

Answer

You can't prevent the Table from showing its scrollbars if it wants to. However, if you give the table the space it requires, it should have to display any scrollbars.

Note: You can simply use SWT.NO_SCROLL in the constructor but if you want to update it later it won't be possible.

Comments