Question

https://i.stack.imgur.com/DK6q0.png

This layout is GridLayout.

Text, Label and Button is element of SWT. So, there use set GridData.

But TreeViewer is a element of JFace. It is can't use GridData.

I Want to TreeViewer's size is fill horizontal.

Était-ce utile?

La solution

There is an underlying SWT Tree component under JFace TreeViewer. You Can do it like this:

treeViewer.getTree().setLayoutData(data);
treeViewer.getTree().setLayout(layout);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top