Can you create a resizable control in SWT?

2019-09-09 06:36发布

问题:

I am currently working with the SWT package in Eclipse. Is it possible to create a resizable control within a composite control.

For instance, if I have a tree control which I would like to expand, but in order to view the sub tree items I would like to 'click and drag' the border of the tree to resize it, much like the draggable divider in the Eclipse help website.

回答1:

I think the SWT Sash is what you are looking for.

Here is a good example on how to use it.

EDIT:

Just found that SashForm is much easier to use. See LINK for a good example.



标签: eclipse swt