Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Scroll problem (Scroll problem in nattable)
Scroll problem [message #915996] Tue, 18 September 2012 11:31 Go to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 51
Registered: September 2012
Member
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 16:58 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 51
Registered: September 2012
Member
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 09:13 Go to previous message
jim liu is currently offline jim liuFriend
Messages: 37
Registered: February 2011
Location: shanghai
Member
Thanks for your code,it works in win7

java eclipse Search
http://javafind.appspot.com/
Previous Topic:Configuration based on widget attributes
Next Topic:Find dialog improvements
Goto Forum:
  


Current Time: Thu Mar 28 23:12:56 GMT 2024

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

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

Back to the top