Search code examples
alignmentjfacetreeviewer

JFace's TreeViewer - Strange alignment on first column


I use a TreeViewer. I do not understand why the first column of my table has an empty space on the left. This does not depend on the column, because if I change the first column, the gap is still there. The second column is well left-aligned.

SC01 : https://i.sstatic.net/veooL.png

SC02 : https://i.sstatic.net/gEDs2.png


Solution

  • This is space left for the tree expand / collapse twistie image. The space is always reserved even if you have no children for the tree nodes.

    If you don't have any children then use TableViewer.