View Full Version : setting a list box item as selected without selecting it
brolife
03-18-2005, 05:51 AM
hey,
I have a button and when i click on it i want it to select a listbox component label.
im using this:
bleh_btn.onRelease=function(){
pictList.selectedItem.data=pat;
}
but this doesnt select the item in the list...
any help greatly appreciated,
cheers.
Hmmm
not sure what you wana do
if you wana select an item in the List from which you know the position(index)
pictList.selectedIndex=1
if you wana select the index whit a specific data in it
then you need to check all items if mach select it
stiakooo
03-20-2005, 04:44 PM
Try the following:
addy_btn.onRelease=function(){
for(var i:Number=0; i<pictList.length; i++){
pictList.selectedIndex=i;
if(pictList.selectedItem.data=="addy"){
break;
}
}
}
brolife
03-21-2005, 01:25 AM
Hi,
for some reason my threads keep being removed!! ANYWAY..
I want to be able to automatically select a label in a list component by clicking on button. The following isnt working:
addy_btn.onRelease=function(){
pictList.selectedItem.data=addy_mc;
}
any help greatly appreciated!
brolife
03-21-2005, 04:59 AM
oh awesome...
thanks for that...
for some reason my threads have been disappearing! CHEERS
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.