Hi,
With the Jewel VirtualList control we have some details that need to be 
addressed, such as this: When the list is not visible only a single element is 
rendered.
I have been looking at this problem for some time and the solution that has 
worked best has been to dispatch the layoutNeeded event in visibleChanged, in 
the VirtualListView.as class:

        override protected function handleInitComplete(event:Event):void
        {
            listModel = (_strand as IStrandWithModel).model as ISelectionModel;
            listModel.addEventListener("selectionChanged", 
selectionChangeHandler);
            listModel.addEventListener("rollOverIndexChanged", 
rollOverIndexChangeHandler);
            listModel.addEventListener("popUpCreated", itemsCreatedHandler);

            (_strand as IUIBase).addEventListener("visibleChanged", 
visibleChangedHandler); << ** new ** >>

            super.handleInitComplete(event);
        }

        protected function visibleChangedHandler(event:Event):void
        {
            if( (_strand as IUIBase).visible )
                sendStrandEvent(_strand,"layoutNeeded");
        }

Do you think I should approach it some other way or is this optimal enough?

Hiedra

Reply via email to