Loading ...
Sorry, an error occurred while loading the content.

Re: TreeView won't highlight node added to tree

Expand Messages
  • hifire81
    Oops. I was looking for focus()!
    Message 1 of 3 , Jul 3, 2009
    • 0 Attachment
      Oops. I was looking for focus()!

      --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      > The node highlighting only sets the className to reflect the
      > highlightState of the node but does no visible changes on its own. You
      > need to use either of the provided highlighting styles or set one of
      > your own. So, if you see the className of the node changed to
      > ygtv-highlight1 or ygtv-highlight2, then the node is highlighted
      > code-wise, you just need to tell it how you want that style to be shown
      > to the user.
      >
      > Satyam
      >
      >
      > Satyam
      >
      >
      > hifire81 escribió:
      > > Hi guys,
      > >
      > > Hopefully this is an easy one. I'm trying to add a node to a rendered tree, and then i want to set that node to be highlighted. My code is something like the below:
      > >
      > > tree = new YAHOO.widget.TreeView("listing-categories");
      > > tree.render();
      > >
      > > ...later on...
      > >
      > > var parentNode = tree.children[0];
      > > var tmp = new YAHOO.widget.TextNode(name, parentNode, false);
      > > tmp.highlight();
      > > parentNode.refresh();
      > >
      > > I've tried render()'ing the tree again among other things. What am I missing?
      > >
      > > Thanks in advance for any help.
      > >
      > > -Jonathan
      > >
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > > ------------------------------------------------------------------------
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - www.avg.com
      > > Version: 8.5.375 / Virus Database: 270.13.2/2214 - Release Date: 07/02/09 05:54:00
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.