Skip to main content



      Home
Home » Eclipse Projects » NatTable » Scroll problem (Scroll problem in nattable)
Scroll problem [message #915996] Tue, 18 September 2012 07:31 Go to next message
Eclipse UserFriend
I am creating EDITOR.

In this editor, two nattables are in adjacent position.

Now when I click any row/cell of any one of the nattable ,the row other table is got selected. Also if I scroll (Vertical ScrollBar) one table,other table is automatically scrolled ,but we found, sometimes this automatic scroll is not working properly,during scroll the row number showing in one table may differ with the row number with second table.
I ve used this for synchronization of this scroll:

Suppose I have two table leftnatTable and rightnatTable

Suppose I have two table leftnatTable and rightnatTable

leftnatTable.addListener(SWT.Selection, new VerticalScrollBarHandler(leftbuilder.getBodyLayerStack().getViewportLayer(),leftnatTable.getVerticalBar())
{
public void handleEvent(Event event)
{
if(leftnatTable.getVerticalBar().getSelection()!=rightnatTable.getVerticalBar().getSelection())
{
rightnatTable.getVerticalBar().setSelection(leftnatTable.getVerticalBar().getSelection());
rightnatTable.getVerticalBar().notifyListeners(SWT.Selection, new Event());


}
}
});



rightnatTable.addListener(SWT.Selection, new VerticalScrollBarHandler(rightbuilder.getBodyLayerStack().getViewportLayer(),rightnatTable.getVerticalBar())
{
public void handleEvent(Event event)
{
if(leftnatTable.getVerticalBar().getSelection()!=rightnatTable.getVerticalBar().getSelection())
{
leftnatTable.getVerticalBar().setSelection(rightnatTable.getVerticalBar().getSelection());
leftnatTable.getVerticalBar().notifyListeners(SWT.Selection, new Event());

}
}
});

Please help me in Scroll Sync of thiese tables.
Re: Scroll problem [message #916935 is a reply to message #915996] Wed, 19 September 2012 12:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi in win vista its working fine ,in winxp it may behave in correctly
Re: Scroll problem [message #991265 is a reply to message #916935] Tue, 18 December 2012 04:13 Go to previous message
Eclipse UserFriend
Thanks for your code,it works in win7
Previous Topic:Configuration based on widget attributes
Next Topic:Find dialog improvements
Goto Forum:
  


Current Time: Wed Jul 23 11:35:49 EDT 2025

Powered by FUDForum. Page generated in 0.10509 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top