Hi all,

Trying to get focus and edit up on a newly added node in a tree.  When
I do the add node function, the selection changes, but it flips to the
top level node for the edit for a split second, then goes back down
and selects the new node at the bottom, but not editable anymore.
Watch closely to see it.

Here is some example code

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
       function addNode(){
               var tempNode=EmployeeTrace.addTreeNode("new employee");
               EmployeeTrace.selectedNode=tempNode;
               EmployeeTrace.focusedCell=undefined;
               EmployeeTrace.focusedCell=tempNode;
       }
]]>
</mx:Script>
   <!-- Simple example to demonstrate the Tree control -->
   <mx:XML id="myxml">
       <Company label="Macromedia">
           <Branch label="Newton">
               <Department label="Flex Doc">
                   <Title label="Intern">
                       <Name label="Kapil Virdi"></Name>
                   </Title>
               </Department>
           </Branch>
       </Company>
   </mx:XML>

   <mx:Panel id="treePanel" title="Tree Trace Panel" marginTop="10">
       <mx:VBox>
           <mx:Tree id="EmployeeTrace" width="285" height="196"
editable="true">

               <mx:dataProvider>
                         {myxml}
               </mx:dataProvider>

           </mx:Tree>
       </mx:VBox>
               <mx:ControlBar>
                       <mx:Button label="Add node" click="addNode()"/>
               </mx:ControlBar>
   </mx:Panel>

</mx:Application>


Am I missing a step?  I followed similar code for a data grid example
I thought...


Thanks,
-Rick


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

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

<*> 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