| Summary: | scrolled Tree gives incorrect y bounds values | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Grant Gayed <grant_gayed> |
| Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe, lshanmug, Silenio_Quarti |
| Version: | 4.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
This is expected behaviour on Mac. The client area changes as you scroll the tree/table/list widget. |
- run the snippet below, and note that the printed client rect y and top item bounds y are large numbers (> 700), but should both be around 0 public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); Tree tree = new Tree(shell, SWT.NONE); tree.setBounds(10,10,300,300); for (int i = 0; i < 99; i++) { new TreeItem(tree, SWT.NONE).setText("root " + i); } tree.select(tree.getItem(55)); shell.pack(); shell.open(); System.out.println("client rect: " + tree.getClientArea()); TreeItem topItem = tree.getTopItem(); System.out.println("top item: " + topItem.getText()); System.out.println("top item bounds: " + topItem.getBounds()); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }