| Summary: | Left/Right keys do not Horizontally Scroll a TABLE/TREE control | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | John Gymer <jgymer> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan |
| Version: | 3.0 | ||
| Target Milestone: | 3.1 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Just checked in SWT Windows. The Tree doesn't scroll horizontally by using left/right keys. Only Table. A chance to be better than SWT then?! It's kind of in conflict with using the keys for expand/collapse/change selection of items. Ah right, fair enough. I think it supports Ctrl+Left/Right though for scroll? Fixed in master with change https://git.eclipse.org/r/#/c/53863/ Ivan/Tim - not sure if you got my note, but there is a problem with the Tree HScroll with keyboard... if you hold Ctrl+LEFT/RIGHT it not only does an HScroll (correctly), but it also does an expand/contract (the same as when Ctrl is NOT held). (In reply to John Gymer from comment #6) > Ivan/Tim - not sure if you got my note, but there is a problem with the Tree > HScroll with keyboard... if you hold Ctrl+LEFT/RIGHT it not only does an > HScroll (correctly), but it also does an expand/contract (the same as when > Ctrl is NOT held). John, a change is pending in Gerrit. As I'm on vacation this week, probably will be merge next week. |
A RAP Table/Tree does not scroll horizontally with the left/right keys. Snippet below... /* DEMONSTRATES TABLE HScroll with keyboard issue */ package bug.snippet; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; public class Bugsy { private Display display; private Shell shell; private static Table tab; private static TableColumn col; public void begin() { System.out.println("BugSnippy Starting..."); // create the Shell display = new Display(); shell = new Shell(display, SWT.TITLE|SWT.CLOSE|SWT.RESIZE); shell.setText("Shell"); shell.setFullScreen(true); shell.setBackground(new Color(null, new RGB(255,192,255))); FormLayout layout = new FormLayout(); shell.setLayout(layout); //create the table tab = new Table(shell, SWT.H_SCROLL|SWT.FULL_SELECTION); col = new TableColumn(tab, SWT.NONE); //col.setResizable(true); col.setWidth(700); col.setText("My Column"); col = new TableColumn(tab, SWT.NONE); //col.setResizable(true); col.setWidth(500); col.setText("My 2nd Column"); //add some data to the table String[] tableData = new String[2]; //2 columns for (int i = 0; i < 100; i++) { tableData[0] = "My Value " + i; tableData[1] = "Wonderful " + i*10; TableItem tableItem = new TableItem(tab, SWT.None, 0); tableItem.setText(tableData); } //set table's position FormData fd = new FormData(); fd.left = new FormAttachment(0, 5); fd.top = new FormAttachment(0, 5); fd.right = new FormAttachment(100,-5); fd.bottom = new FormAttachment(100,-130); tab.setLayoutData(fd); shell.open(); System.out.println("BugSnippy Done!"); } }