:: Forum >>

Tree node alignment error

Hi Alex,

I'm using the tree within a DIV that is often set to display='none'.
When I set the DIV visible, the child nodes within the tree are aligned left.
Can you please suggest a solution so the nodes do not move.

Sample source below:

<a href="#" onclick="CCC.style.display = 'none';">Hide</a><br />
<a href="#" onclick="CCC.style.display = '';">Show</a><br />
<div id='CCC'>
<script type='text/javascript'>
var tree = [[1, 2, 3], [4, 5], [], [8, 9], [6, 7], [], [], [], [], []];
var itemText = ["", "Node 1", "Node 2", "Node 3", "Node 4", "Node 5", "Node 6", "Node 7", "Node 8", "Node 9"];

var obj = new AW.UI.Tree;
obj.setItemText(itemText);
obj.setViewCount(function(i){return tree[i] ? tree[i].length : 0});
obj.setViewIndices(function(i){return tree[i]});
obj.setItemImage(["", "home", "favorites", "fontsize", "search", "search"]);
obj.setSelectionMode("multi");

document.write(obj);
</script>
</div>

Thanks
Matt
Wednesday, October 10, 2007

This topic is archived.


Back to support forum

Forum search