View Full Version : ListBox - Disabling Labels?
Hey,
Does anyone know if you are able to disable certain labels in a listbox while keeping others enabled?
~Deo
Drakkon
04-28-2004, 03:31 PM
are you talking about making it so the listbox has certain items within that you can click on? I don't think the makers even though of that while creating the object...
I'm guessing you are trying to break the list into sections?
annexion
04-28-2004, 03:31 PM
Why can't you just remove the element from the list's dataprovider?
Well the reason why is because im displaying a map of the USA, and some states you will be able to click on, while others arent available yet and should be disabled or unselectable.
This way the states are still displayed in the listbox, but arent enabled to be selected as of just yet.
Heres a link to what im working on:
http://www.adivity.com/map/
Drakkon
04-28-2004, 04:41 PM
wow thats pretty awesome dood :D
it looks like all they gave us for the list object in 2004 is itemRollOver and itemRollOut and labelFunction when it comes to dealing with objects within the list...you could play around with those to create a virtual "disable" (if not in te list of acceptable "states" then deselect item immediately) but i dont think theres anything that will actually let you disable selecting items in the list
Thanks :) ...its still my first stab at flash here so I dont really expect it to be the best.
Yeah im actually populating the list from and xml document along with the itemRollOver and itemRollOut already and have been messing with it for a little while now to see if I can actually disable an individual label. But it just keeps disabling the entire listbox hehe. Oh well :P
do you know how to make it so that I can at least highlight a label inside the listbox without having the mouse over it?
Drakkon
04-28-2004, 04:57 PM
to select an item within a list box just put in your code:
listBox.selectedIndex = itemIndex;
Yep, that works. But instead of selecting it, is there a way I can set the style to show the mouseover as opposed to selecting it? Or is that not possible?
~Thanks again for your help!
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.