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

Re: Strange Borders Around TreeView ???

Expand Messages
  • chaluwa
    Thanks Adam, I guessed as much and tried your suggestion earlier, my mistake was that I did these instead #remoteListings div,span {
    Message 1 of 5 , Oct 1, 2007
      Thanks Adam, I guessed as much and tried your suggestion earlier, my
      mistake was that I did these instead
      #remoteListings div,span {
      border:0;padding:0;margin:0;
      }
      and of course it didn't work, now I know better, thanks again.
      Please is it possible to enable selection of multiple nodes (and
      access same)in a tree instance, if possible how.
    • Adam Moore
      ... Something like this should work: var selected = {}; var tree = new YAHOO.widget.TreeView(...); tree.subscribe( labelClick , function(node) { // assumes we
      Message 2 of 5 , Oct 1, 2007
        On Mon, Oct 01, 2007 at 09:04:55PM -0000, chaluwa wrote:
        > Thanks Adam, I guessed as much and tried your suggestion earlier, my
        > mistake was that I did these instead
        > #remoteListings div,span {
        > border:0;padding:0;margin:0;
        > }
        > and of course it didn't work, now I know better, thanks again.
        > Please is it possible to enable selection of multiple nodes (and
        > access same)in a tree instance, if possible how.

        Something like this should work:

        var selected = {};
        var tree = new YAHOO.widget.TreeView(...);

        tree.subscribe("labelClick", function(node) {
        // assumes we just care about the node label
        var key = node.label;
        var el = node.getLabelEl();

        // keep track of and mark selected nodes
        if (selected[key]) {
        delete selected[key];
        el.style.backgroundColor = "yellow";
        } else {
        selected[key] = true;
        el.style.backgroundColor = "white";
        }
        });

        -Adam
      • chaluwa
        Thanks Adam, I figured out a similar solution and I have the working draft at http://localhost/petterson-clor/admin/console.html Thanks to you anyway, your
        Message 3 of 5 , Oct 1, 2007
          Thanks Adam, I figured out a similar solution and I have the working
          draft at http://localhost/petterson-clor/admin/console.html
          Thanks to you anyway, your solidarity was most encouraging.

          Charles Odili,
          University of Benin, Nigeria
        Your message has been successfully submitted and would be delivered to recipients shortly.