Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5992649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:33:45+00:00 2026-05-22T23:33:45+00:00

I have the follow code – as TreeItemRenderer <?xml version=1.0 encoding=utf-8?> <mx:TreeItemRenderer xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark

  • 0

I have the follow code – as TreeItemRenderer

<?xml version="1.0" encoding="utf-8"?>
<mx:TreeItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
                     xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:mx="library://ns.adobe.com/flex/mx"
                     xmlns:solar="*">
    <fx:Script>
        <![CDATA[
            import mx.containers.Canvas;
            import mx.containers.VBox;
            import mx.controls.Alert;
            import mx.controls.Button;
            import mx.controls.CheckBox;
            import mx.controls.Tree;
            import mx.controls.listClasses.BaseListData;
            import mx.controls.treeClasses.TreeListData;
            import mx.core.mx_internal;
            use namespace mx_internal;

            protected var buttonBox : VBox;

            override protected function createChildren() : void
            {
                super.createChildren();
                setStyle( "verticalAlign", "top" );

                this.addEventListener( MouseEvent.CLICK, mouseHandler );
            }

            protected function mouseHandler( event : MouseEvent ) : void
            {

                if( data.@buttonsVisible == "true" )
                    data.@buttonsVisible = "false"
                else
                    data.@buttonsVisible = "true";

                showButtons();
            }

            private function showButtons() : void
            {
                if(  true )
                {
                    if( buttonBox == null )
                    {
                        buttonBox = new VBox();
                        buttonBox.setStyle( "verticalGap", 0 );
                        addChild( buttonBox );

                        var b1 : Button     = new Button();
                        b1.percentWidth = 100;
                        b1.label        = "block";
                        buttonBox.addChild( b1 );

                        var b2 : Button     = new Button();
                        b2.percentWidth = 100;
                        b2.label        = "block1";
                        buttonBox.addChild( b2 );

                        var b3 : Button     = new Button();
                        b3.percentWidth = 100;
                        b3.label        = "block";
                        buttonBox.addChild( b3 );
                    }
                }
                else 
                    if( buttonBox != null )
                    {
                        removeChild( buttonBox );
                        buttonBox = null;
                    }
                invalidateSize();
                invalidateDisplayList();
            }

            override public function set listData( value : BaseListData ) : void
            {
                super.listData = value;

                if( listData )
                {
                    showButtons();
                }
            }

            override protected function measure() : void
            {
                super.measure();

                if( buttonBox != null )
                {

                    //buttonBox.visible = buttonBox.includeInLayout =( !isOpening && isOpen ) ;
                    var b : Boolean = false;

                    if( data.@buttonsVisible != null )
                        b = data.@buttonsVisible == "true";

                    buttonBox.visible = buttonBox.includeInLayout = b;

                    if( buttonBox.visible )
                    {
                        buttonBox.y     = measuredHeight;
                        measuredHeight += buttonBox.measuredHeight;
                    }
                }
            }

            override protected function updateDisplayList( unscaledWidth : Number, unscaledHeight : Number ) : void 
            {
                super.updateDisplayList( unscaledWidth, unscaledHeight );

                if( buttonBox != null )
                {
                    buttonBox.x = 40;
                    buttonBox.setActualSize( unscaledWidth - buttonBox.x, unscaledHeight );
                }
            }

        ]]>
    </fx:Script>
</mx:TreeItemRenderer>

The application code is as follow :

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <mx:Tree x="289" y="0" width="377" height="599" labelField="@label" itemRenderer="iRR"  variableRowHeight="true">
    <mx:dataProvider>
        <fx:XMLList xmlns="">
            <folder state="unchecked" label="Marketing Collateral" isBranch="true" >
                <folder state="unchecked" isBranch="true" label="Media, PR, and Communications" >
                    <folder state="unchecked" isBranch="false" label="Article Reprint Disclaimers" />
                    <folder state="unchecked" isBranch="false" label="Articles Reprints" />
                    <folder state="unchecked" isBranch="false" label="Interviews and Transcripts" />
                    <folder state="unchecked" isBranch="false" label="Press Kits" />
                    <folder state="unchecked" isBranch="false" label="Press Releases" />
                    <folder state="unchecked" isBranch="false" label="Quick Hits" />
                    <folder state="unchecked" isBranch="false" label="Rep Talking Points" />
                    <folder state="unchecked" isBranch="false" label="Special Updates" />
                    <folder state="unchecked" isBranch="false" label="White Papers" />
                    <folder state="unchecked" isBranch="false" label="Article Reprint Disclaimers" />
                    <folder state="unchecked" isBranch="false" label="Articles Reprints" />
                    <folder state="unchecked" isBranch="false" label="Interviews and Transcripts" />
                    <folder state="unchecked" isBranch="false" label="Press Kits" />
                    <folder state="unchecked" isBranch="false" label="Press Releases" />
                    <folder state="unchecked" isBranch="false" label="Quick Hits" />
                    <folder state="unchecked" isBranch="false" label="Rep Talking Points" />
                    <folder state="unchecked" isBranch="false" label="Special Updates" />
                    <folder state="unchecked" isBranch="false" label="White Papers" />
                    <folder state="unchecked" isBranch="false" label="Article Reprint Disclaimers" />
                    <folder state="unchecked" isBranch="false" label="Articles Reprints" />
                    <folder state="unchecked" isBranch="false" label="Interviews and Transcripts" />
                    <folder state="unchecked" isBranch="false" label="Press Kits" />
                    <folder state="unchecked" isBranch="false" label="Press Releases" />
                    <folder state="unchecked" isBranch="false" label="Quick Hits" />
                    <folder state="unchecked" isBranch="false" label="Rep Talking Points" />
                    <folder state="unchecked" isBranch="false" label="Special Updates" />
                    <folder state="unchecked" isBranch="false" label="White Papers" />
                    <folder state="unchecked" isBranch="false" label="Article Reprint Disclaimers" />
                    <folder state="unchecked" isBranch="false" label="Articles Reprints" />
                    <folder state="unchecked" isBranch="false" label="Interviews and Transcripts" />
                    <folder state="unchecked" isBranch="false" label="Press Kits" />
                    <folder state="unchecked" isBranch="false" label="Press Releases" />
                    <folder state="unchecked" isBranch="false" label="Quick Hits" />
                    <folder state="unchecked" isBranch="false" label="Rep Talking Points" />
                    <folder state="unchecked" isBranch="false" label="Special Updates" />
                    <folder state="unchecked" isBranch="false" label="White Papers" />
                </folder>
                <folder  state="unchecked" isBranch="true" label="Forms and Applications" >
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                </folder>
                <folder  state="unchecked" isBranch="true" label="Forms and Applications" >
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                </folder>
                <folder  state="unchecked" isBranch="true" label="Forms and Applications" >
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                    <folder state="unchecked" isBranch="false" label="Applications" />
                    <folder state="unchecked" isBranch="false" label="Forms" />
                </folder>
            </folder>
        </fx:XMLList>
    </mx:dataProvider>
    </mx:Tree>
</s:Application>
  • The code basically works for a bit but after a few items been opened – it fail, and scrolling becaming buggy.
    Please help.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:33:46+00:00Added an answer on May 22, 2026 at 11:33 pm

    Try Spark Tree, it’s based on Spark List and is free of all the MX Tree bugs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi all I have the follow code: Linkify.addLinks(tv, Pattern.compile(http://www.abc.com),http://www.abc.com?m=signup); Problem is I keep getting
I have follow code to make a String to a CFString: internal static byte[]
I have follow html code: <a href=#>Evente (0)</a> an i need: <a href=#>Evente <span>0</span></a>
I have the follow code: string DB1 = DB1 = Regex.Match(contents, @DB1=(?<DB1>[^\r\n]+)).Groups[DB1].Value; The code
i have the follow code: searchResults.SearchResultCollection.Add( new SearchResult() { Header = HttpUtility.HtmlDecode( htmlDocument.DocumentNode .SelectSingleNode(initialXPath
I have the follow VBA code and it returns a ' data type mismatch
What i have this the follow code foreach (HtmlNode link in htmldocObject.DocumentNode.SelectNodes(//a[@href])) { HtmlAttribute
I got an undeclared identifier error from the follow code, but i have clearly
I have the follow code: onclick= <?php echo 'postwith(\''.$_SERVER['PHP_SELF'].'\',{export:\'export\',date:\''.$_POST['date'].'\'})'; ?> while postwith is a
I have the follow code that allows me to drag a div into 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.