AbstractPropertySection and wrapping [message #654841] |
Thu, 17 February 2011 06:43  |
Eclipse User |
|
|
|
Hi everybody,
I'm trying to create a property sheet using eclipse forms. The property
sheet should print documentation for objects selected. The documentation
could be quite long and should wrap automatically. Well and here is the
problem it does not. I've tried a lot of stuff but nothing seams to
work. I am already wondering if it is possible or not. Here is some code
I wrote:
public void createControls(Composite parent,
final TabbedPropertySheetPage atabbedPropertySheetPage) {
super.createControls(parent, atabbedPropertySheetPage);
toolkit = new TabbedPropertySheetWidgetFactory();
form = toolkit.createForm(parent);
form.setText("Documentation");
TableWrapLayout descriptionLayout = new TableWrapLayout();
descriptionLayout.numColumns=1;
form.getBody().setLayout(descriptionLayout);
TableWrapData twd = new TableWrapData();
twd.colspan=1;
twd.grabVertical=true;
twd.grabHorizontal=true;
String t = "dhfjsfhk hfdskj fhjksd fhdsjkf hjkhjkhfdsjhk
hfjdshhjkhdfs hfdsjhfdj fhdjfh sdhfjdhjfdskhjfdsh hfdjskhf dsjkjhfdjsk h
hfdskjhfdjsh hjkfsdh fdhjkshfdskjhfdsj hjfdskhf dshjfksdhf sdjk";
FormText text = toolkit.createFormText(form.getBody(), false);
text.setText(t, false, false);
text.setLayoutData(twd);
}
No mater what widget I take the long text t is not wrapped :(
Regards
Martin
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03489 seconds