Community
Participate
Working Groups
3.7 M6. TreeColumn.getWidth() returns 0 for an unrealized tree column. This is not mentioned in the Javadoc and hence one could expect that: setWidth(w) ==> w == getWidth(). Either we fix getWidth() or improve the Javadoc. In the latter case one needs additional API that allows to tell whether the column was realized or not since testing getWidth() == 0 is not OK as the column could indeed be 0. Such an API would actually be useful on any widget.
ExtendedMarkersView, has the following workaround due to this bug: viewer.getTree().addPaintListener(new PaintListener() { @Override public void paintControl(PaintEvent e) { treePainted= true; viewer.getTree().removePaintListener(this); } });
Is this a Linux issue or does it happen on all platforms?
(In reply to Eric Williams from comment #2) > Is this a Linux issue or does it happen on all platforms? Don't know.
(In reply to Eric Williams from comment #2) > Is this a Linux issue or does it happen on all platforms? How do I test this? I disabled the workaround in ExtendedMarkersView and saw no getWidth() == 0 on Windows 7. Also in Snippet170 column1.getWidth() always returns 200. No matter if immediately after setWidth before or after shell open or in tree paint listener.
Maybe this has been fixed in the last 7 years?