I would not expect this to work. The value of verticalScrollPosition must be <= maxVerticalScrollPosition
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Pat Buchanan Sent: Monday, December 10, 2007 4:09 PM To: [email protected] Subject: [flexcoders] verticalScrollPosition issue in a Tree Greetings Flexers I've run into an issue where a tree control is drawing it's bottom nodes over the top of the root node, but ONLY when I set the tree's verticalScrollPosition and ONLY when I **collapse** the bottom nodes. I've attached a screenshot so you can see what I'm experiencing, and here is the code: private function moveToNode(event:TreeEvent): void { var nIndex:int = (event.target as Tree).itemRendererToIndex(event.itemRenderer); (event.target as Tree).selectedIndex = nIndex; (event.target as Tree).verticalScrollPosition = nIndex; } It get's called on the Tree's itemOpen and itemClose events: itemOpen="moveToNode(event)" itemClose="moveToNode(event)" If I comment out the "verticalScrollPosition" line the problem goes away. My goal is this: When someone opens a tree node, I want to set focus to it, and bring it and it's children into view so the user does not have to scroll if they open a node near the bottom of the control. Maybe there is a better way to do this? If I don't get a quick answer I'll put together a test case application and submit to the group. Flex version: 2.0.1 Browser: IE 6 Thanks in advance, -Pat Buchanan www.DataNotion.com <http://www.DataNotion.com>

