'SWT (mouse)ScrollBar not working while scrolling through the results set
I am using SWT ScrollBar/Slider to scroll through my resultset. When I use the vertical scroll bar(see pic), it allows me to scroll through the results without any problem. But when I use mouse scroll, it gets stuck after fetching a certain no. of rows, and now if I go back to using the vertical scroll, it allows me to scroll through the remaining results.
ScrollBar sbar = this.getVerticalBar();
if (sbar != null)
{
sbar.setEnabled(true);
sbar.setVisible(false);
sbar.setValues(4, 0, 10, 1, 1, 3);
sbar.addSelectionListener(new SelectionListener()
{
public void widgetSelected(SelectionEvent e)
{
// Cancels editing
cancelEdit(true);
final int selection = ((ScrollBar)e.widget).getSelection();
m_vertBar.setSelection(selection);
GridSWT.this.vScrollTo(selection);
}
public void widgetDefaultSelected(SelectionEvent e)
{
}
});
}
Can anyone pls help me fix it? Would be really helpful.
Thanks, Ashishenter image description here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
