Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Regular Contributor
nfallon55
Posts: 54
Registered: 02-04-2012
My Carrier: T-Mobile

set listbox item as selected dynamically and highlight the item

I have a list that I add items to and then requery a table to refresh the list.  I have the item that I added in string variable.  I would like to set the listbox to have the variable as the selected listitem and highlight the item in the list.  So far I am able to get the variable to be the selected item but can't figure out how to get the list to highlight the item as if it were selected manually.

 

myLists.selectedItem = myNewListItem;

 

Neil

 

Please use plain text.
Regular Contributor
nfallon55
Posts: 54
Registered: 02-04-2012
My Carrier: T-Mobile

Re: set listbox item as selected dynamically and highlight the item

This works and highlights the list item but the list needs to scroll to that item.  I currently have to scroll through the list if it is longer than the screen.

 

Neil

Please use plain text.
Developer
jtegen
Posts: 4,247
Registered: 10-27-2010
My Carrier: Verizon

Re: set listbox item as selected dynamically and highlight the item

Please use plain text.
Regular Contributor
nfallon55
Posts: 54
Registered: 02-04-2012
My Carrier: T-Mobile

Re: set listbox item as selected dynamically and highlight the item

I don't have qnxdialog as one of the import items for flash builder 4.6

 

Please use plain text.
Developer
jtegen
Posts: 4,247
Registered: 10-27-2010
My Carrier: Verizon

Re: set listbox item as selected dynamically and highlight the item

Please use plain text.
Regular Contributor
nfallon55
Posts: 54
Registered: 02-04-2012
My Carrier: T-Mobile

Re: set listbox item as selected dynamically and highlight the item

For some reason I am unable to import qnx anything.

 

 

Please use plain text.
Developer
jtegen
Posts: 4,247
Registered: 10-27-2010
My Carrier: Verizon

Re: set listbox item as selected dynamically and highlight the item

Under project properties, do you have (under Flex Build Packaging/BlackBerry Tablet OS) "Add platform specific libraries to library path" checked?
Please use plain text.
Regular Contributor
nfallon55
Posts: 54
Registered: 02-04-2012
My Carrier: T-Mobile

Re: set listbox item as selected dynamically and highlight the item

I checked the checkbox and when I try to import it does the intellisnse as I'm typing but comes up with an error on the import:

 

Definition qnx.ui:listClasses could not be found.   

 

 

Please use plain text.
Developer
jtegen
Posts: 4,247
Registered: 10-27-2010
My Carrier: Verizon

Re: set listbox item as selected dynamically and highlight the item

listClasses is a folder. Try:

import qnx.ui.listClasses.List;
Please use plain text.
Regular Contributor
nfallon55
Posts: 54
Registered: 02-04-2012
My Carrier: T-Mobile

Re: set listbox item as selected dynamically and highlight the item

Since I have a spark List component I will have to change everything over to use the qnx list class?  That would make the app only able to run on a playbook.

Please use plain text.