Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534

    select the last node in tree

    what i want to do is ;
    if no node is selected the select the last node...

    i tried to select the first node but i couldnt make it work...

    Code:
    on page load :
    Code:
    SelectedTab = Tree.GetSelectedNode("Tab_Panel");
    if SelectedTab ~= "" then
    WebProps = Web.GetProperties("Web1");
    BaseUrl = Web.GetURL("Web1");
    RealUrl = WebProps.URL
    tblNodeData = {};
    tblNodeData.Text = BaseUrl;
    tblNodeData.Data = RealUrl;
    tblNodeData.Expanded = true;
    tblNodeData.NodeIndex = SelectedTab;
    tblNodeData.ImageIndex = 8;
    tblNodeData.SelectedImageIndex = 8;
    Tree.SetNode("Tab_Panel", SelectedTab, tblNodeData); 
    else
    Tree.GetNode("Tab_Panel", "1"); 
    WebProps = Web.GetProperties("Web1");
    BaseUrl = Web.GetURL("Web1");
    RealUrl = WebProps.URL
    tblNodeData = {};
    tblNodeData.Text = BaseUrl;
    tblNodeData.Data = RealUrl;
    tblNodeData.Expanded = true;
    tblNodeData.NodeIndex = SelectedTab;
    tblNodeData.ImageIndex = 8;
    tblNodeData.SelectedImageIndex = 8;
    Tree.SetNode("Tab_Panel", SelectedTab, tblNodeData);
    end

  2. #2
    Join Date
    Dec 2007
    Location
    Missouri, United States
    Posts
    476
    I was playing around with this earlier today with favs so here you go jack you should be able to modify it with no problem.

    Code:
    On Page Show:
    Code:
    if Tree.GetSelectedNode("Favorites_Panel") == "" then
      cCnt = Tree.GetChildCount("Favorites_Panel", "1");
      Tree.SetSelectedNode("Favorites_Panel", "1."..cCnt);
    end

  3. #3
    Join Date
    Mar 2007
    Posts
    172
    tree again

  4. #4
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    thanks alot TimeSurfer but i dont use childnode anymore... i am just sending u my whole project u will c what i mean...


    this almost do what i need
    Tree.SetSelectedNode("Favorites_Panel", "1");
    Last edited by jackdaniels; 04-24-2008 at 02:08 AM.

  5. #5
    Join Date
    Dec 2007
    Location
    Missouri, United States
    Posts
    476
    Quote Originally Posted by jackdaniels View Post
    thanks alot TimeSurfer but i dont use childnode anymore... i am just sending u my whole project u will c what i mean...
    k ill take a look

Similar Threads

  1. Tree flicker issue
    By Animl in forum AutoPlay Media Studio 7.5
    Replies: 0
    Last Post: 03-16-2008, 11:15 PM
  2. Tree flicker issue
    By Animl in forum AutoPlay Media Studio 7.5
    Replies: 0
    Last Post: 03-16-2008, 11:15 PM
  3. Select Tree Node to Display Table
    By pakapaka in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 07-07-2007, 10:58 AM
  4. How can I get the Node count in a tree object?
    By Josué Alba in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 02-08-2007, 08:34 AM
  5. How can i get the name of the selected Node in the Tree Plugin?
    By RapD in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 10-16-2005, 04:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts