我有一个显示 ScrolledComposite 的应用程序。用户抱怨水平滚动增量太细,即每次单击水平滚动箭头当前一次移动条一个像素。他们希望单独的点击引起更大的水平移动。有人可以解释我如何实现这个吗?代码片段如下:
ScrolledComposite myScrolledComposite = new ScrolledComposite(parent,
SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
if ( myScrolledComposite == null) {
throw new NullPointerException("ScenePreView.java: " +
"Method createPartControl() " +
"ScrolledComposite myScrolledComposite == null.");
}
Composite myComposite = new Composite(myScrolledComposite, SWT.NONE);
if ( myComposite == null) {
throw new NullPointerException("ScenePreView.java: " +
"Method createPartControl() " +
"Composite myComposite == null.");
}
myScrolledComposite.setContent(myComposite);