Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » WordWrap in Tabbed Property(Problem getting word wrap work in (Styled-)Text field in Tabbed Property View)
WordWrap in Tabbed Property [message #1730585] Tue, 26 April 2016 22:26
Carel Bast is currently offline Carel BastFriend
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:
index.php/fa/25770/0/
  • Attachment: No_WRAP.JPG
    (Size: 62.31KB, Downloaded 355 times)

[Updated on: Tue, 26 April 2016 22:28]

Report message to a moderator

Previous Topic:Caret reset on StyledText
Next Topic:VIRTUAL (Checkbox)TreeViewer has inconsistent selection
Goto Forum:
  


Current Time: Tue Sep 25 07:04:07 GMT 2018

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

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

Back to the top