문제

I'm using a SWT TreeViewer to show some paths, is it possible to trim the path string to insert "..." (points) when the path is too long a is not fully visible in the tree column?

Something like this:

enter image description here

Thanks in advance

도움이 되었습니까?

해결책

Ok, reading the TreeColumn code I have noticed that the TreeViewer add ellipsis (...) to the columns automatically, but only if the column index is > 0. So column 0 strings are not truncated.

Try all eclipse views that uses a TreeView.

Really I don't understand this behavior.

다른 팁

Yes, you can use DecoratingLabelProvider over the LabelProvider which shows full paths (which is presumably what you have at the moment).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top