Bug 130769

Summary: Scrollbar scrolls past beginning of Table
Product: [Eclipse Project] Platform Reporter: Rutger Ovidius <ovidr>
Component: SWTAssignee: Steve Northover <steve_northover>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rutger Ovidius CLA 2006-03-07 13:43:30 EST
SWT CVS Win32

Run snippet and manually move the horizontal scrollbar to the left.  It scrolls past the beginning of the table.


  public static void main(String[] args) {
    
    final Display display = new Display();
    final Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    final Table table = new Table(shell, SWT.VIRTUAL | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
    final int columns = 5;

    for (int i = 0; i < columns; i++)
      new TableColumn(table, SWT.LEFT).setWidth(150);

    table.setLinesVisible(true);
    table.setHeaderVisible(true);
    
    table.setSortDirection(SWT.DOWN);
    table.setSortColumn(table.getColumn(0));
    
    

    table.addListener(SWT.SetData, new Listener() {
      public void handleEvent(Event event) {
        TableItem item = (TableItem) event.item;
        String text = null;
        text = "node " + table.indexOf(item);
        item.setText(text);
      }
    });
    table.setItemCount(5000);
    
    shell.setSize(600, 800);
    shell.open();

    table.getHorizontalBar().setSelection(500);
    
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
        display.sleep();
    }
    display.dispose();
Comment 1 Steve Northover CLA 2007-12-10 23:32:17 EST
This is a bug in Windows, however, it is invalid to reach into a table and manipuate the scroll bar directly.
Comment 2 Eclipse Webmaster CLA 2019-09-06 15:31:05 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.