0 Replies Latest reply on Feb 15, 2010 12:35 AM by hidarikani

    Tree logic

    hidarikani Level 2

      Hello,

       

      I would like to add checkboxes to Tree nodes that don't have children.

      So how do I perform the check in the overriden method of the TreeItemRenderer class:

       

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


         myCheckBox = new CheckBox();
         myCheckBox.setStyle( "verticalAlign", "middle" );
         myCheckBox.addEventListener( MouseEvent.CLICK, checkBoxToggleHandler );
         addChild(myCheckBox); //add this check box only to nodes that don't have children

      }