WordWrap in Tabbed Property [message #1730585] |
Tue, 26 April 2016 22:26 |
Carel Bast Messages: 16 Registered: November 2009 |
Junior Member |
|
|
Hi,
I am trying to get word wrap working in a TabbedPropertySheet containing a Editable Text field that must have WordWrap enabled.
My code looks like this:
MyPropSec extends AbstractPropertySection
[...]
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
[...]
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
Form form = toolkit.createForm(parent);
form.setSeparatorVisible(true);
GridLayout body_gd = new GridLayout(1, false);
form.getBody().setLayout(body_gd);
section = toolkit.createSection(form.getBody(), ExpandableComposite.EXPANDED | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
section.setLayoutData(gd);
toolkit.paintBordersFor(section);
section.setText(sectionText);
section.setExpanded(true);
section.setEnabled(true);
section.setLayout(new FillLayout());
fieldText = new Text(section, SWT.WRAP);
[...]
At first this looks ok, but if I resize the PropertyTab the text is not wrapped anymore (resize used width of non-wrapped text).
What am I doing wrong here?
Thanks for your help,
-- Carel
See screenshot:
-
Attachment: No_WRAP.JPG
(Size: 62.31KB, Downloaded 703 times)
[Updated on: Tue, 26 April 2016 22:28] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02471 seconds