File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes synchronize two SWT scrollbars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "synchronize two SWT scrollbars" Watch "synchronize two SWT scrollbars" New topic

synchronize two SWT scrollbars

Jack clouseau

Joined: May 14, 2008
Posts: 22
Hi All,

Currently, I have two tables each with their own scrollbars. When I move one scrollbar, the other scrollbar also moves. But the other table will not scroll (so only the scrollbar moves, the table doesn't). I've tried refreshing, updating, redrawing the table, but nothing seems to make the table itself scroll.

To make the other scrollbar move, I have a SelectionListener and in widgetSelected, I set setSelection of my scrollbar with the value of the other scrollbar. And this only updates the scrollbar.
can anyone help?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea!!!
It is sorta covered in the JavaRanch Style Guide.
subject: synchronize two SWT scrollbars
It's not a secret anymore!