Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2006
    Posts
    7

    Checked alls or unchecked alls checkboxes of a tree

    Hello,

    Y have a tree, and y want to set alls checkBoxes true with a button and false with other button

    (Checked or unchecked alls checkboxes of my tree with a button)

    Sorry but my english speaking is bad.

    Thx

    Rotac

  2. #2
    Join Date
    Mar 2005
    Posts
    222
    can you opload a simple example of the tree?

  3. #3
    Join Date
    Mar 2006
    Posts
    7
    it's a tree very simple, without subitem, but with 10 nodes.
    Name Tree: "tree1"
    Node index: "1", "2", "3", ....

    Thx

    Rotac

  4. #4
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Here is how you would check all nodes off node 1 of a tree object. If you want to add subnodes a little more code will be required.

    Code:
    str_TreeName = "Tree1";
    tbl_NodeProps = {};
    tbl_NodeProps.Checked = true;
    
    -- Get the number of nodes off of node 1 of the tree
    num_ChildCount = Tree.GetChildCount(str_TreeName, "1");
    
    -- Step through each of the nodes and set the checked property to true
    for num_Index = 1, num_ChildCount do
    	Tree.SetNode(str_TreeName, "1." .. num_Index, tbl_NodeProps);
    end
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  5. #5
    Join Date
    Mar 2006
    Posts
    7
    Thank you TJS, but, I don't think that your code is what I want

    You can look at the attachement file for an example.

    THx

    Rotac
    Attached Files

  6. #6
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    rotac, upload an exported sample of your project ... you may get more help Can't manipulate a Word Doc.

  7. #7
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Quote Originally Posted by rotac
    Hello,

    Y have a tree, and y want to set alls checkBoxes true with a button and false with other button

    (Checked or unchecked alls checkboxes of my tree with a button)

    Sorry but my english speaking is bad.

    Thx

    Rotac
    Sorry if I have misinterpreted your request rotac. My understanding was that you wanted to have a button that when pressed, checks all of the boxes in a tree. The code sample provided above does that when placed in the 'On Click' event of any button that is on the same page as the tree object. To uncheck, just change the tbl_NodeProps.Checked = false and paste the code into the 'On Click' event of another button (of you could set this up so that one button toggles check/uncheck).

    EDIT: I just checked your word doc and will post adjusted code shortly...
    Last edited by TJS; 06-06-2006 at 07:03 AM.
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  8. #8
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Attached is and example of what you have described in you word doc. Download and preview to see how it works. Most of the code is in the Global Functions so you can reuse it across pages.

    Hope this helps...
    Attached Files
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  9. #9
    Join Date
    Mar 2006
    Posts
    7
    Thank you very much TJS.

    Its exactly that y want...


Similar Threads

  1. Tree and checkboxes
    By Jaume in forum AutoPlay Media Studio 6.0
    Replies: 3
    Last Post: 04-12-2006, 01:36 AM
  2. Tree default checked
    By purg in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 10-02-2005, 06:03 PM

Posting Permissions

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