| Summary: | Label with SWT.WRAP does not wrap in chrome and firefox | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Phill Perryman <phill_perryman> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | tbuschto |
| Version: | 2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Actually, this behavior is entirely correct. If you wish the Label to wrap, you need to give it a layout data, like this: label.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) ); I checked against SWT, where it is exactly like in RAP. The only issue here is that it supposedly is NOT like this in IE 10, but in my tests with current master this works in IE 10 like in all other browser, so it might be related to changes introduced since the version you are using. I'm closing the bug as INVALID. Feel free to re-open if you disagree. Thanks, it was the grab horizontal that fixes it, I can change all the other GridData parameters. It was not obvious grabbing horizontal space when the label was already full screen width. |
The following code when run from eclipse wraps the text as expected in IE10, in chrome it produces a single line of text which is truncated. Changing to a FillLayout wraps as expected but of course does not pack the widgets at the top of the screen. Row and Flow layout produce the same truncation. Firefox truncates the same as Chrome, Safari and Chrome on my iPad wrap as expected. This is a show stopper for me as I have pages which have large sections of text which the user will not be able to read. public class BasicEntryPoint extends AbstractEntryPoint { @Override protected void createContents(Composite parent) { parent.setLayout(new GridLayout()); new Label(parent, SWT.WRAP).setText("This text is wider than a single screen width so with the SWT.WRAP style it should wrap onto multiple lines. With IE10 it wraps as expected, with Chrome and Firefox only a single truncated line is shown"); } }