John, that's great info and should allow me to address the problem. I really appreciate the answer. Thanks :]
On 2/25/07, shuell2000 <[EMAIL PROTECTED]> wrote:
Your problems stem from the fact that Lists reposition and resize children each time updateDisplayList is called. Which is whenever you scroll or resize any of their children. List components extend TileBase which has a method called makeRowsAndColumns which is the method that is causing you frustration at the moment. Lists were not meant to hold itemRenderers that can resize themselves. Instead Lists have built in mouseOver and mouseDown handlers that recolor the background behind the object causing the mouseEvent and they must have thought that would be good enough. I recently had to rewrite the list classes to allow a resize to work on mouseOver of its children. It was an ugly hack but the project timeline did not allow me to do much more at the moment. Basically I created my own Tilebase and ListBase classes then changed the updateDisplayList method and the makeRowsAndColumns method to leave alone any itemRenderer that was not in its default state. Aside from a few issues caused by this, it seems to have solved my issue but is hardly clean enough to post here. Take a look at those methods I mentioned and see if you can't do something in them to ignore anything that is transitioning to a new state or in a new state. Good Luck, John Shuell --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, nwebb <[EMAIL PROTECTED]> wrote: > > Hi, > I have a custom item renderer with two states (expanded and collapsed) > My items are displayed in a List component, and the data is currently coming > from an ArrayCollection. > > You can see the page here (click on "Gig Calender"): > http://www.bathbands.co.uk/test2007/ > > Here is an example of the problem I'm facing: > > 1) Click the "Read More" button of the first item in the List - it will > expand. > 2) Scroll down and you can see that the third and last item have also > expanded. > 3) Scroll back up and you will see that the first item is now in the > collapsed state again, but other items are now in the expanded state. > > I'm not sure what's causing the other items to open/close. I guess it has > something to do with Flex redrawing stuff as it goes off screen, and would > appreciate suggestions on how best to prevent this kind of thing from > happening. > > Cheers, > Neil >