| Summary: | Setting font to a table scrolls it to the top | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eiswind, gheorghe |
| Version: | 3.8 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
*** Bug 370989 has been marked as a duplicate of this bug. *** Bogdan, this is the font table scrolling problem I showed you earlier today. 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. If the bug is still relevant, please remove the "stalebug" whiteboard tag. |
1. Run the snippet. 2. Scroll the table to the bottom. 3. Click the button. 4. The table scrolls to the top! --------------- Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final Table table = new Table(shell, SWT.NONE); for (int i = 0; i < 20; i++) { new TableItem(table, SWT.LEAD).setText(String.valueOf(i)); } new Button(shell, SWT.PUSH).addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { table.setFont(table.getFont()); } }); Point size = table.computeSize(SWT.DEFAULT, SWT.DEFAULT); shell.setSize(size.x, size.y / 2); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose();