Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Form Header is not rendered correctly
Form Header is not rendered correctly [message #504340] Fri, 18 December 2009 12:12 Go to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
This is a multi-part message in MIME format.

------=_NextPart_000_000A_01CA7FE3.B72E9EB0
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit

Hi,

I have a form with a form text and a form message. But depending on the form
text the header is rendered somewhat strage.
e.g. create something like this

public void createPartControl(Composite parent) {

toolkit = new FormToolkit(parent.getDisplay());
form = toolkit.createScrolledForm(parent);
form.setText("Form & Title");
form.setMessage("Message", IMessageProvider.ERROR);
...
}

will cause the browser to display just "Form" and "Message" (see attached
image). "& Title" is missing. Same behaviour if you write "Form__Title" (_
as Whitespace). It works as expected with a single whitespace ("Form
Title").
It looks like the TitleRegion's dimension is computed incorrectly in those
cases.

A bug?

Regards,
Niels

------=_NextPart_000_000A_01CA7FE3.B72E9EB0
Content-Type: image/png;
name="form.png"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="form.png"

iVBORw0KGgoAAAANSUhEUgAAAMAAAAAmCAIAAAAdowPPAAAE2ElEQVR4nO3a b0gbZxwH8N/dPTF/
jBVBHcbaWVFUqistbNSysNBudnFEysD5crTQQfoilPTFwBa2Fy7sTUXywlDc +ufFXgT3YujwWCgs
Q5iMwda5lMWZqdXNLlFrk6gx9e6evTiNGpOs25Xkir8P98LnOf3dT/jy3HOX MIIgAEL/F1voBtCL
DQOEFMEAIUUwQEgRkvv0jM/36IsBHSvSyBoAMJXFpKyi4r0Pqk6dykt7SO2Y HE9hE86Lm5OzL5lq
So42GGpNALA+uxCfmQovzGsaa1/pu5XHPpFKZQ3Q9++f1y7Fmt56RyMkYCMp JjcBgCvSMAbt+pO1
0E8/JMsPnb77Vca/7b58PW3GO9D7fPtGKpH5Fjbj82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5xNu7bJ8ua3iW2R73R7h9ZOOmjjCOGG ge6vkHEytRlXn1yf
hQHA/C3v6j1f/MFva48iJdpi/csm9ojJ+GZ7zcXuvLV4sLjN3FCXOOYodB/P 6l8ChPLEbeac8oul
thfr5SQGCCmCXyhDimCAkCIYIKQIBggpggFCimCAkCIYIKQII+X8Tg9CuREM EFICb2FIEQwQUgQD
hBTBACFFMEBIEQwQUgQDhBTBACFF/gFFpjT2D6+GAAAAAABJRU5ErkJggg==

------=_NextPart_000_000A_01CA7FE3.B72E9EB0--
Re: Form Header is not rendered correctly [message #504359 is a reply to message #504340] Fri, 18 December 2009 13:11 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Niels,

to visualize the '&' character in TitleRegion (Label widget) a double
'&&' is needed - this is the same in SWT. Anyway, the described problem
is a TextSizeDetermination issue. Maybe you run into this bug:
256133: [TextSizeDetermination] Re-layouting for controls in a
ScrolledComposite
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256133

HTH,
Ivan

On 12/18/2009 14:12, Niels Lippke wrote:
> Hi,
>
> I have a form with a form text and a form message. But depending on
> the form text the header is rendered somewhat strage.
> e.g. create something like this
>
> public void createPartControl(Composite parent) {
>
> toolkit = new FormToolkit(parent.getDisplay());
> form = toolkit.createScrolledForm(parent);
> form.setText("Form & Title");
> form.setMessage("Message", IMessageProvider.ERROR);
> ...
> }
>
> will cause the browser to display just "Form" and "Message" (see
> attached image). "& Title" is missing. Same behaviour if you write
> "Form__Title" (_ as Whitespace). It works as expected with a single
> whitespace ("Form Title").
> It looks like the TitleRegion's dimension is computed incorrectly in
> those cases.
>
> A bug?
>
> Regards,
> Niels
Re: Form Header is not rendered correctly [message #504360 is a reply to message #504359] Fri, 18 December 2009 13:29 Go to previous message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Thanks Ivan,

you're so right.



"Ivan Furnadjiev" <ivan@eclipsesource.com> schrieb im Newsbeitrag
news:hgfv2h$v3u$1@build.eclipse.org...
> Hi Niels,
>
> to visualize the '&' character in TitleRegion (Label widget) a double '&&'
> is needed - this is the same in SWT. Anyway, the described problem is a
> TextSizeDetermination issue. Maybe you run into this bug:
> 256133: [TextSizeDetermination] Re-layouting for controls in a
> ScrolledComposite
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=256133
>
> HTH,
> Ivan
>
> On 12/18/2009 14:12, Niels Lippke wrote:
>> Hi,
>>
>> I have a form with a form text and a form message. But depending on the
>> form text the header is rendered somewhat strage.
>> e.g. create something like this
>>
>> public void createPartControl(Composite parent) {
>>
>> toolkit = new FormToolkit(parent.getDisplay());
>> form = toolkit.createScrolledForm(parent);
>> form.setText("Form & Title");
>> form.setMessage("Message", IMessageProvider.ERROR);
>> ...
>> }
>>
>> will cause the browser to display just "Form" and "Message" (see attached
>> image). "& Title" is missing. Same behaviour if you write "Form__Title"
>> (_ as Whitespace). It works as expected with a single whitespace ("Form
>> Title").
>> It looks like the TitleRegion's dimension is computed incorrectly in
>> those cases.
>>
>> A bug?
>>
>> Regards,
>> Niels
Previous Topic:Memory is exhausted quickly during development
Next Topic:[ANN] RAP 1.3 M4 is available
Goto Forum:
  


Current Time: Mon Nov 29 16:13:15 GMT 2021

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

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

Back to the top