Community
Participate
Working Groups
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();
This is a bug in Windows, however, it is invalid to reach into a table and manipuate the scroll bar directly.
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.