How to resize a scroll composite to always fit its contents horizontally?
问题 I have a scrolled composite ,it contains a tableViewer. My requirement is that if the table is increased in width,the scroll composite should not show horizontal scroll ,but it should expand to fit table's size. The only reason I have used a scrolled composite here is I want to show vertical scroll bar. 回答1: If you want to control the scrollbars of a Table in SWT - which is a sub-class of Scrollable - simply add one or more of the following styles in the constructor. If you construct a Viewer