|
Re: Label with a multiLine text not displayed correctly [message #213481 is a reply to message #213364] |
Thu, 06 April 2006 10:28 |
Eclipse User |
|
|
|
Originally posted by: remove-this-pgarbacz.pgs-soft.com.remove.this
Hi,
> Hi everyone,
>
> I have a problem to display a multiline text in a Label. In fact the
> bounds of the Label are well calculated but the text is displayed as a
> single line.
> In the joinded file, it shows you what I get (the label associated with
> the first link), and what I would like (the other link).
> In fact I don't understand why the bounds are well determined whereas
> the label is not able to display correctly the text inside.
>
> I use the following code to set the text of the label :
> String cond = "? condition";
> String emiss = "! emission";
> myLabel.setText(cond + "\n" + emiss);
>
> Is this a bug related to the Label implementation ? Does a Label is able
> to display a multiline text or should I use the TextFlow instead ?
Have you tried replacing "\n" with "\r\n"? Windows uses this combination as
a newline character.
Regards,
Pawel
|
|
|
Re: Label with a multiLine text not displayed correctly [message #213563 is a reply to message #213481] |
Fri, 07 April 2006 08:10 |
Jacques LESCOT Messages: 247 Registered: July 2009 |
Senior Member |
|
|
Hi,
I found the origin of my problem : I am working on a Linux distribution
.... and when I check that on a Windows machine, it works (with the "\n"
character).
I also try to use Character.LINE_SEPARATOR, but it does not work anymore.
Is this a bug concerning the Linux OS ?
Regards,
Jacques
Pawel Garbacz a écrit :
> Hi,
>
>
>>Hi everyone,
>>
>>I have a problem to display a multiline text in a Label. In fact the
>>bounds of the Label are well calculated but the text is displayed as a
>>single line.
>>In the joinded file, it shows you what I get (the label associated with
>> the first link), and what I would like (the other link).
>>In fact I don't understand why the bounds are well determined whereas
>>the label is not able to display correctly the text inside.
>>
>>I use the following code to set the text of the label :
>> String cond = "? condition";
>> String emiss = "! emission";
>> myLabel.setText(cond + "\n" + emiss);
>>
>>Is this a bug related to the Label implementation ? Does a Label is able
>>to display a multiline text or should I use the TextFlow instead ?
>
>
> Have you tried replacing "\n" with "\r\n"? Windows uses this combination as
> a newline character.
>
> Regards,
> Pawel
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03555 seconds