BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-27-2008, 05:42 AM   #1 (permalink)
New Member
 
Join Date: Jul 2008
Model: Curve
PIN: N/A
Carrier: ts
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Multi lines LabelField?

Please Login to Remove!

Hi Experts,
Is there anyway to show message with multi lines in LabelField?
This doesnt work as expected

String text = lable.getText();
text += ('\r\n' + "newText");
lable.setText(text);

it only get wraps when its fill the top line :(

Thanks in advance.
Dishan
Offline  
Old 10-27-2008, 09:14 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 8130
PIN: N/A
Carrier: US Cellular
Posts: 82
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why are you enclosing \r\n in single quotes? That is used to enclose a single character. Try using double quotes, because I believe the second character, \n, which is the important one, is being ignored.
Offline  
Old 10-30-2008, 12:03 AM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Model: Curve
PIN: N/A
Carrier: ts
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmmm It doent work. :(
Its a chat screen. So I want to append user entered text into Lable with newLine
Offline  
Old 10-30-2008, 03:53 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

assuming newtext is a String with some new text and lable is your LabelField:
Code:
lable.setText(lable.getText()+"\n"+newtext);
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 10-30-2008, 10:10 AM   #5 (permalink)
New Member
 
Join Date: Jul 2008
Model: Curve
PIN: N/A
Carrier: ts
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I used LabelField and Its only works after first line fill up. Is there any reason for this.?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.