Community
Participate
Working Groups
On Linux, a selection event is received by this scrollbar. None is received on win32. public static void main(String [] args) { Display display = new Display(); Shell shell = new Shell(display); Table table = new Table(shell, SWT.NONE); ScrollBar scrollBar = table.getVerticalBar(); scrollBar.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) {} public void widgetSelected(SelectionEvent e) { System.out.println("Selection event"); } }); for(int i = 0; i < 500; i++) { TableItem item = new TableItem(table, SWT.NONE); item.setText(0, "This is item " + i); } table.setTopIndex(20); shell.open(); while(display.readAndDispatch()); display.dispose(); }
This is still reproducible, not sure how important it is bug still reproducible none the less.
The use of gtk_tree_view_scroll_to_cell() in GTK3 is actually selecting the scrollbar in order to get to the cell, causing the selection event to be received by the scrollbar. I haven't been able to find a viable solution to block the scrollbar widget signals considering its being triggered from the Table widget. Also, I don't believe its likely someone is bump into use case, considering its been 11 years with no updates.