BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-03-2009, 09:47 AM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Model: 7100
PIN: N/A
Carrier: GSM
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get Selected ListField Value on a Lebel in Blackberry?

Please Login to Remove!

Hi Experts,

in my application i want to get the value on a label when the listField elements are selected.
my purpose is to get the value on lebel on focus of listField elements.

Thanks in Advance
Offline  
Old 02-04-2009, 03:53 AM   #2 (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

if you use a listfield you can get the selected object by using getSelectedIndex (to get the index) and get on the ListFieldCallback.
You will get the object and can do whatever you want with it, like getting its label (if in doubt, use toString())
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 02-04-2009, 04:29 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2008
Location: Scotland
Model: None!
PIN: N/A
Carrier: Vodafone
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Override onFocus and use

String text = callback.get(list, list.getSelectedIndex()).toString();
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

1x MITEL MT5C2568DJ-25 , Static RAM, 32Kx8, Plastic, SOJ-28
$7.8
1x MITEL MT5C2568DJ-25 , Static RAM, 32Kx8, Plastic, SOJ-28 picture4x NKK N341256SJ-15 , N341256SJ15 , Static RAM , SRAM 32Kx8 , SOJ-28
$8.8
4x NKK N341256SJ-15 , N341256SJ15 , Static RAM , SRAM 32Kx8 , SOJ-28 picture2x RCA CDP1824E , IC 32-Word x 8-Bit Static RAM , PDIP-18 , OBSOLETE NEW
$12.9
2x RCA CDP1824E , IC 32-Word x 8-Bit Static RAM , PDIP-18 ,  OBSOLETE  NEW picture1x INTEL D2125AL , Static RAM, 1Kx1 , CDIP-16
$5.8
1x INTEL D2125AL , Static RAM, 1Kx1 , CDIP-16 pictureGreenlee 767 Hydraulic Hand Knockout Punch Pump & 746 Ram w/Dies Set
$449.99
Greenlee 767 Hydraulic Hand Knockout Punch Pump & 746 Ram w/Dies Set picture






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