aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "synchronize two SWT scrollbars" Watch "synchronize two SWT scrollbars" New topic
Author

synchronize two SWT scrollbars

Jack clouseau
Greenhorn

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?

thanks


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