Scroll problem [message #915996] |
Tue, 18 September 2012 11:31 |
dhruba kumar 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.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03078 seconds