how can I print the Tree Control?

ejml24ejml24 Member Posts: 4
edited 2004-04-02 in Dynamics AX
Hi folks.

Can somene how print the content of Tree's Control?

Thanks

Comments

  • govaerskgovaersk Member Posts: 1
    Hi,

    some recursive method like this could help you:

    boolean printtree(int n=mytree.getRoot(), boolean bcontinue=true)
    {
    Formtreeitem TreeItem,Child;
    int parentidx;
    ;
    TreeItem = mytree.getitem(n);
    print TreeItem.text();
    if (TreeItem.children()>0)
    {
    parentidx = TreeItem.idx();
    child = tree.getItem(mytree.getchild(parentidx));
    While (child && bcontinue)
    {
    bcontinue = element.printtree(child.idx());
    child = mytree.getitem(mytree.getnextsibling(child.idx()));
    }
    }
    return bcontinue;
    }

    Have fun

    Koen
Sign In or Register to comment.