Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » AbstractPropertySection and wrapping
AbstractPropertySection and wrapping [message #654416] Tue, 15 February 2011 16:37 Go to next message
Martin Tauber is currently offline Martin TauberFriend
Messages: 122
Registered: July 2009
Senior Member
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
Re: AbstractPropertySection and wrapping [message #654574 is a reply to message #654416] Wed, 16 February 2011 11:28 Go to previous messageGo to next message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
Hi,

Does setting the wrap style for the text work for you?
--> createFormText(form.getBody(), false, SWT.WRAP)

Eclipse Forms belong to Platform UA, please post your question in the Platform - User Assistance forum if setting this doesn't work.


Lakshmi P Shanmugam
Re: AbstractPropertySection and wrapping [message #654839 is a reply to message #654574] Thu, 17 February 2011 11:43 Go to previous message
Martin Tauber is currently offline Martin TauberFriend
Messages: 122
Registered: July 2009
Senior Member
Thanks for the info .... I'll post it there and not that did not work.

Regards
Martin

Am 16.02.11 12:28, schrieb Lakshmi Shanmugam:
> Hi,
>
> Does setting the wrap style for the text work for you?
> --> createFormText(form.getBody(), false, SWT.WRAP)
>
> Eclipse Forms belong to Platform UA, please post your question in the
> Platform - User Assistance forum if setting this doesn't work.
>
Previous Topic:Can't access Label
Next Topic:TabItem contents problems
Goto Forum:
  


Current Time: Fri Apr 19 20:48:17 GMT 2024

Powered by FUDForum. Page generated in 0.03339 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top