|
I did
this but it had some problems with the width being set. I seems to grow too
fast, but to add a node I did this:
var added =
node.add( <parameters>
); added.invokeEvent('create'); node.collapse(); node.addChild(
added ); node.expand();
This
was the only way I could get the new node to show up.
Jon
If you want to add nodes dynamically you'll have
to experiment, you can call
node1.add(blah)
after the tree is built, and then
myTree.repaint()
or maybe node1.repaint()
but you'll need to add more code to get it to
work properly.
Richard.
----- Original Message -----
Sent: Thursday, March 15, 2001 6:44
PM
Subject: [Dynapi-Help] Dynamic Tree
Building
I am new to this Dynamic Layer API. Please bear
with me if my questions are slightly dumb.
For eg. I would like to add a Node to the Tree
Based on the text the user entered and when they click a
button.
I understand that it can be done if I refresh
the whole page. But, I do not want to refresh the whole page.
Basically, I am
trying to build a dynamic tree based on what the
user searches for.
Any ides?
TIA for any help.
Dinesh.
|