List Info

Thread: Tree2 - a new node & scroll to?




Tree2 - a new node & scroll to?
user name
2006-07-31 08:59:30
Dear All,

we are happily using tree2 & the problem I have is to do
with the scrolling.

Is there anyway to tell the scrooling mechanism to scroll to
a given node?

i.e. we have a tree which is sufficiently large that it
needs a scroll 
bar etc. When we add a new node, it is added to the end of
the tree in 
some applications & in a sorted position in others (e.g.
the nodes are 
alphabetically sorted).his means that when a user clicks to
add a new 
node, he has to scroll down to the end of what might be a
large tree 
every time which can get to be a pain for those inserting
data.

I add a node as follows:

		Node XPNode = deb.addChildN();
		String path = dtb.getpathToRoot(XPNode);
		dtb.tree.expandPath(dtb.tree.getPathInformation(path));

& the node happily expands etc but....that in no way
interacts with the 
scrolling. i..e the node is expanded but it's still off the
page & 
requires scrolling to get to it.

So how do I (can I?) set the focus to the node added as
above such that 
the scrolling mechanism takes the user to that node?

TIA


Adam

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )