I would like to have a resizable text area in one of my Eclipse Plugins. It should have a gripper on the lower right corner that can be dragged to change the size of the text area, similar to following html example:
<!DOCTYPE html>
<html>
<body>
<textarea rows="4" cols="50">
This is a resizable html text area with a gripper at the lower right corner. How to create something similar with SWT JFace?</textarea>
</body>
</html>
I am already able to create an SWT multi-line text:
Text textArea = toolkit.createText(parentContainer, "Default text", SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
textArea.setEnabled(isEnabled());
textArea.setToolTipText("tooltip");
GridData areaData = new GridData();
areaData.grabExcessHorizontalSpace = true;
areaData.horizontalAlignment = GridData.FILL;
areaData.verticalAlignment = GridData.FILL;
areaData.grabExcessVerticalSpace = true;
areaData.heightHint = 80;
areaData.widthHint = 200;
textArea.setLayoutData(areaData);
Instead of the scroll bar I would like to have a gripper that is able to resize the text field vertically and horizontally.
The documentation for the Text element is here and I could not find a gripper option: http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fswt%2Fwidgets%2FText.html
How can I add a gripper to the text?
Is there a resizable panel with a gripper that I can use to wrap the text? A "Sash" only seems to be resizable in one direction: Can you create a resizable control in SWT?
Is there a finished control that provides the functionality I am looking for? (I had a look at the nebula widgets but there does not seem to be a text area component with gripper.)