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

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);
        GridLayout body_gd = new GridLayout(1, false);

        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.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 534 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: Mon Apr 19 01:07:01 GMT 2021

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

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

Back to the top