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

Johnson Controls Two Stage Room Thermostat T25A-1C
$70.0
Johnson Controls Two Stage Room Thermostat T25A-1C pictureJohnson Controls Metasys XP-9104-8304 Expansion Module, 4 Digital Inputs, 4 Digi
$56.38
Johnson Controls Metasys XP-9104-8304 Expansion Module, 4 Digital Inputs, 4 Digi pictureJohnson Controls Metasys Expansion Module XP-9105-8304, 8 Digital Inputs
$56.38
Johnson Controls Metasys Expansion Module XP-9105-8304, 8 Digital Inputs pictureP70NA-1 Johnson Controls Penn Dual Pressure Switch
$93.97
P70NA-1 Johnson Controls Penn Dual Pressure Switch pictureJOHNSON CONTROLS Y65A13-0 CLASS 2 TRANSFORMER- 120 VAC, 60 HZ Primary
$10.0
JOHNSON CONTROLS Y65A13-0  CLASS 2 TRANSFORMER- 120 VAC, 60 HZ Primary  picture






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