I'm mapping a file tree to a QxTree. But i find myself wanting to create my own Tree object and using it and the QxTree in tandem to do what i want. This is because for every tree node i want to save the filename, path and children. Or sometimes i want to change the apperance of a specific node. Also when i just collapse a QxTree it only works if i save all the nodes in a seperate array and collapse them all reversed - like this:

function collapse(nodes) {
  for (var i=1; i <= nodes.length; i++)
    nodes[nodes.length - i].setOpen(false);
}

otherwise i get display errors.

But this is all ugly. So to sum it up: Is there an elegant way to collapse a QxTree and save extra information for every node?

- Peter

Reply via email to