what I did so far was:

I extended the extendItem method in my custom tree adding the following:
if(open)
{
        var allChildren:int = getAllChildrenCount(item); // with this function 
I  
get the amount of new child recently added

        if((rowInfo[selectedIndex].y + super.rowHeight + (allChildren *  
super.rowHeight)) > listContent.height)
        {
                trace("need to scroll")

                verticalScrollPosition += 22; // Hardcoded number just for 
testing  
purpose
        }
}

it scrolls, but it also change the visibility of other items...

Any clue?

thanks,
Diego.










On Thu, 18 Jan 2007 07:11:54 +1300, Alex Harui <[EMAIL PROTECTED]> wrote:

> You should be able to set verticalScrollPosition on the tree.  It will
> fix up the scrollbars for you.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Diego Guebel
> Sent: Tuesday, January 16, 2007 8:46 PM
> To: [email protected]
> Subject: [flexcomponents] updating scrollbar on a tree component
>
> Hi there,
> I just developed a tree that has the ability to add children on demand.
> It
> works just fine.
> I want to be able to automatically pushed the rows up so that newly
> expanded rows are available without user scrolling.
> I've tried using different methods from the scrollbar classes with no
> luck. Although I could scroll the rows it craches the tree.
>
> Any clue?
>
> Thanks in advance, Diego.
>
>
> Yahoo! Groups Links
>
>
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcomponents/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcomponents/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to