| Summary: | MeasureItem not called when Table/TreeColumn packed | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Grant Gayed <grant_gayed> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | stalebug | ||
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. 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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. -- The automated Eclipse Genie. |
In the snippet below, every invocation of TreeColumn.pack() in the timer should cause the MeasureItem callback to be invoked, but it's not happening. public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setBounds(10,10,300,300); shell.setLayout(new FillLayout()); final Tree tree = new Tree(shell, SWT.NO_SCROLL | SWT.H_SCROLL); tree.setHeaderVisible(true); new TreeColumn(tree, SWT.NONE); new TreeItem(tree, SWT.NONE).setText("hi"); tree.addListener(SWT.MeasureItem, new Listener() { public void handleEvent(Event event) { event.width = counter; System.out.println(counter); } }); display.timerExec(1000, new Runnable() { public void run() { if (tree.isDisposed()) return; counter += step; if (counter == 10) { step = 20; } if (counter == 350) { step = -20; } tree.getColumn(0).pack(); display.timerExec(1000, this); } }); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }