Label size calculation error for text with consecutive spaces [message #808123] |
Mon, 27 February 2012 07:33  |
Eclipse User |
|
|
|
Hi,
I have created a custom dialog class in my RAP application. I have overridden the method 'createDialogArea' to add labels and other controls to my dialog. The issue is for labels with style property 'WRAP' and that have more than one consecutive spaces. The text width for such labels is being determined as if there is a single space due to which my label text gets cut off.
So, for ex if my text is
'Eclipse Rich Ajax Platform - Testing single spaces',
the width calculation is done such that my text would be
'Eclipse Rich Ajax Platform - Testing single spaces'. (with single spaces)
So when the text is actually displayed, the calculated width is not able to accommodate the text.
I have attached a simple dialog code to reproduce this.
Regards,
Aman.
begin 644 MyDialog.java
M<&%C:V%G92!O<F<N96-L:7!S92YR87`N9&5M;RYC;VYT<F]L<SL-"@T*:6UP
M;W)T(&]R9RYE8VQI<'-E+FIF86-E+F1I86QO9W,N1&EA;&]G.PT*:6UP;W)T
M(&]R9RYE8VQI<'-E+G-W="Y35U0[#0II;7!O<G0@;W)G+F5C;&EP<V4N<W=T
M+F-U<W1O;2Y#3&%B96P[#0II;7!O<G0@;W)G+F5C;&EP<V4N<W=T+G=I9&=E
M=',N0V]M<&]S:71E.PT*:6UP;W)T(&]R9RYE8VQI<'-E+G-W="YW:61G971S
M+D-O;G1R;VP[#0II;7!O<G0@;W)G+F5C;&EP<V4N<W=T+G=I9&=E=',N4VAE
M;&P[#0H-"G!U8FQI8R!C;&%S<R!->41I86QO9R!E>'1E;F1S($1I86QO9R![
M#0H-"@EP<F]T96-T960@37E$:6%L;V<H4VAE;&P@<&%R96YT4VAE;&PI('L-
M"@D)<W5P97(H<&%R96YT4VAE;&PI.PT*"7T-"@T*"7!R;W1E8W1E9"!#;VYT
M<F]L(&-R96%T941I86QO9T%R96$H0V]M<&]S:71E('!A<F5N="D@>PT*"0E#
M;VUP;W-I=&4@8V]M<&]S:71E(#T@*$-O;7!O<VET92D@<W5P97(N8W)E871E
M1&EA;&]G07)E82AP87)E;G0I.PT*"0E#3&%B96P@;&%B96P@/2!N97<@0TQA
M8F5L*&-O;7!O<VET92P@4U=4+E=205`I.PT*"0EL86)E;"YS971497AT*")%
M8VQI<'-E("!2:6-H("!!:F%X("!0;&%T9F]R;2`@+2`@5&5S=&EN9R`@<VEN
M9VQE("!S<&%C97,B*3L-"@D)<F5T=7)N(&-O;7!O<VET93L-"@E]#0H-"@DO
M*BH-"@D@*B`-"@D@*B\-"@EP<FEV871E('-T871I8R!F:6YA;"!L;VYG('-E
;<FEA;%9E<G-I;VY5240@/2`Q3#L-"@T*?0T*
`
end
[Updated on: Mon, 27 February 2012 07:36] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds