My dialog have two TreeViewer
components. The vertical scroll bars have to be synchronized.
I have tried with setSelection
and setTopItem
methods but both have no effect to other tree.
xViewerLeft = createXViewer(leftComposite, this);
xViewerRight = createXViewer(rightComposite, this);
xViewerLeft.getTree().getVerticalBar().addListener(SWT.Selection, new Listener() {
@Override public void handleEvent(Event arg0) {
//xViewerRight.getTree().setSelection(xViewerLeft.getTree().getSelection());
//xViewerRight.getTree().setTopItem(xViewerLeft.getTree().getTopItem());
}
});
Any ideas?