you can use the list's properties (arrays of indices, or items): selectedItems selectedIndices
On Sun, Oct 25, 2009 at 7:19 PM, steveb805 <quantumcheese...@gmail.com>wrote: > > > > The only property I could find, from the Flex docs, that tells you whether > your List control has anything selected is: isItemSelected(). > > And this takes a parameter that refers to a specific item. So before my > Delete button handler, I check if any item is selected with the following: > > private function deleteHandler() { > > var bDoesNotHasFocus: Boolean = true; > var len:Number = projectList.dataProvider.length; > > for (var i:int = 0; i <= len - 1; i++) { > if (projectList.isItemSelected(projectList.dataProvider[i])) > { > bDoesNotHasFocus = false; > } > } > if (bDoesNotHasFocus) > return; > > // the code to delete > > } > > Is there a better way, anyone? > Thanks, > Steve > > > -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,