3 Replies Latest reply on Jan 11, 2008 4:12 PM by 2JZ

    Opening sub leaf under tree control help!

    2JZ Level 1
      Guys,

      I am trying to implement a tree control which expands to a specific item and highlighted.
      I've got a simple example from the forum.

      <?xml version="1.0" encoding="utf-8"?>
      <folders>
      <folder label="Home Page">
      <folder label="Slide Show"/>
      <folder label="Other Folder">
      <folder label="Photos">
      <photo item="Photo1"/>
      <photo item="Photo2"/>
      <photo item="Photo3"/>
      </folder>
      </folder>
      </folder>
      </folders>


      I would like to expand the "Other folder" & "Photos" leafs and highlight "photo2". How can I get this done?

      // To open the "Other folder", I can use:
      TreeCtrl.expandItem(TreeXMLList.getItemAt(1), true);

      How do I get the 2nd level (Photos) to expand and highlight the "photo2"?