BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 08-22-2008, 12:35 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2007
Location: montreal
Model: 8100
PIN: N/A
Carrier: rogers
Posts: 70
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I change a labelfield text?

Please Login to Remove!

I have a screen with 2 horizontalfieldmanagers and 2 verticalfieldmanagers representing a 4-cell grid. Each cell contains a labelfield with a default value. The code is as follows:

vfmC1.add(new LabelField("r1c1"));

Now I want to set up a listener so that when I enter a value in another part of the screen this LabelField text (r1c1) changes to a new value. I do not want to display another screen or use a dialogbox and would rather just change the value.

How would I go about doing this? I tried this but it doesn't work:

vfmC1.setText("test");

Thanks...
Offline  
Old 08-22-2008, 02:35 PM   #2 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have to run setText() on the label field itself, not the manager...

LabelField lf = new LabelField("r1c1");
vfmC1.add(lf);
lf.setText("test");
Offline  
Old 08-22-2008, 03:02 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2007
Location: montreal
Model: 8100
PIN: N/A
Carrier: rogers
Posts: 70
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Remy.

I actually tried that but didn't work. I tried it again and its fine now. Probably a noobie mistake the first time around.

Thanks again...
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

WHOLESALE LIQUIDATION SIEMENS RELAY 7PU6020-7NJ20
$69.0
WHOLESALE LIQUIDATION SIEMENS RELAY 7PU6020-7NJ20 pictureWHOLESALE LIQUIDATION SIEMENS 3TB44 17-OA CONTACTOR
$29.5
WHOLESALE LIQUIDATION SIEMENS 3TB44 17-OA CONTACTOR pictureSIEMENS 3NE3335 SITOR 560A 1000VAC SEMICONDUCTOR FUSE INSERT NEW (H30)
$149.99
SIEMENS 3NE3335 SITOR 560A 1000VAC SEMICONDUCTOR FUSE INSERT NEW (H30) pictureLOT OF 4 - SIEMENS 3UA55 00-0K SOLID STATE OVERLOAD RELAY *NEW*
$38.27
LOT OF 4 - SIEMENS 3UA55 00-0K SOLID STATE OVERLOAD RELAY *NEW* pictureFREESHIP Siemens Foot switch 6A 380V Foot Pedal 3SR6 122 VDE0660 Ind Heavy Duty
$99.99
FREESHIP Siemens Foot switch 6A 380V Foot Pedal 3SR6 122 VDE0660 Ind Heavy Duty  picture






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