Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348365 - [Forms] form text with an ampersand is cut off
Summary: [Forms] form text with an ampersand is cut off
Status: RESOLVED DUPLICATE of bug 371360
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-06 05:06 EDT by Flavio Donze CLA
Modified: 2012-03-23 08:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flavio Donze CLA 2011-06-06 05:06:41 EDT
Build Identifier: 1.4.0.20110601-1304

Here is an example snipped:
IManagedForm managedForm = new ManagedForm(parent);
ScrolledForm scrolledForm = managedForm.getForm();
Form form = scrolledForm.getForm();
form.setText("TEST1 & TEST2");

Only "TEST1" is displayed, the rest is cut off. If I replace the & with something like #, "TEST1 # TEST2" is displayed.

Reproducible: Always
Comment 1 Ivan Furnadjiev CLA 2011-06-06 06:44:02 EDT
Flavio, if you want to visualize the '&' character you should use double '&' in the string like:
form.setText( "TEST1 && TEST2" );
Read Label#setText JavaDoc for more details. Nevertheless, text cut off (wrapping) is a bug. The space for the label (calculated by Label#computeSize) is smaller and the text wraps.
Comment 2 Flavio Donze CLA 2011-06-06 07:12:09 EDT
Ivan thanks for pointing that out! I didn't notice that in the RCP application it didn't get displayed as well.
Comment 3 Ivan Furnadjiev CLA 2012-03-23 08:00:52 EDT
I found that actually this bug is a duplicate of bug 371360. A single '&' character is replaced with a space, resulting in multiple spaces between words.

*** This bug has been marked as a duplicate of bug 371360 ***