BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-31-2008, 09:29 PM   #1
sday
New Member
 
Join Date: Jul 2008
Model: 8700c
PIN: N/A
Carrier: Cingular
Posts: 6
Default ListField - selectedIndexChange event

Please Login to Remove!

Is there such a thing? So far the only way I can figure to be notified when the selected index of a ListField changes is through the drawListRow.

I've search everywhere but can't seem to find any examples of a callback for that purpose.

Thanks for any help
-Steve
Offline  
Old 07-31-2008, 10:53 PM   #2
CELITE
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Default

You can override moveFocus. Check the selected item before the call to super then the selected item after. If different, you've got it. Additionally you could just override moveFocus with the x and y arguments and use those to determine your movement but I've found it unreliable in some circumstances.
Offline  
Old 07-31-2008, 11:01 PM   #3
sday
New Member
 
Join Date: Jul 2008
Model: 8700c
PIN: N/A
Carrier: Cingular
Posts: 6
Default

Funny you should mention a workaround, I did this in the drawListRow and it seems to work.
Code:
// Until I find a better way, this is how I get a single listchange event.
            iValue = list.getSelectedIndex();
            if(iValue != iSelIndex)
            {
                iSelIndex=iValue;
                cfm.ChangeContent(menu[iSelIndex]);
            }
I'll have to try it in moveFocus as I'm guessing it doesn't get called as much as drawListRow.

Thanks
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Utility Aluminum Trim Coil 24

Utility Aluminum Trim Coil 24" x 40-45 FT Long with Minor Scratches and Dents

$84.95



D4PE12029AA 6 Volt Ignition Coil Fits Ford/New Holland Tractor 600 700 800 picture

D4PE12029AA 6 Volt Ignition Coil Fits Ford/New Holland Tractor 600 700 800

$26.44



Allen Bradley Contactor, 100-C60*00, Series A, 230 Volt AC coil, 90 Amp, 3-pole picture

Allen Bradley Contactor, 100-C60*00, Series A, 230 Volt AC coil, 90 Amp, 3-pole

$299.00



Ignition Coil For Briggs And Stratton 395491 397358; IBS3002 picture

Ignition Coil For Briggs And Stratton 395491 397358; IBS3002

$40.22



High Performance Ignition Coil 8 Pack for Ford F-150 F-250 F-350 4.6L 5.4L picture

High Performance Ignition Coil 8 Pack for Ford F-150 F-250 F-350 4.6L 5.4L

$98.99



1100-0541 6 Volt Ignition Coil for Ford Tractor 2N 8N 9N Front Mount 9N12024 picture

1100-0541 6 Volt Ignition Coil for Ford Tractor 2N 8N 9N Front Mount 9N12024

$27.36







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