See if this will work,
// your code
var index:int = list.selectedIndex;
list.dataProvider.addItem(item);
list.validateNow();
moveToIndex(index);
protected function moveToIndex(index:int):void {
var point:Point =
list.layout.getScrollPositionDeltaToElement(index);
Any time I add or remove an item from a Spark list, the list resets itself to
display the first element at the top. Is there a way to get the list to
remember its current location? For example if I'm scrolled half way down a list
and remove an item I would like the list to remain scrolled to
2 matches
Mail list logo