Board Logo

Scrolling the tree to selected item?
csnorbert - 10/7/2007 at 06:13 PM

I'm displaying the Tree Menu in a fix sized box, because the site's design not allowing to display the full tree.

Is solvable, that the tree's selected item (folder or leaf) scrolling automatic to the displaying box's top?

In other words, when some item is selected, let it be always visible in the box automatic?

Is this solvable with some javascript?

My displaying box's HTML:

<div id="treebox" style="width:560; height:140;background-color:#f5f5f5;border :1px solid Silver; overflow:auto;"/><script type="text/javascript">new tree (TREE_ITEMS, TREE_TPL);</script></div>

thank you!


tigra - 4/14/2008 at 03:49 PM

this function is not supported, but it's possible to implement.
for that we need to:

1. get the id of the HTML element containing the selected item
2. calculate the vertical offset of that element in the document
3. scroll the page to that vertical position

Please submit a support ticket if you need help with #1 or if you need a quote for implementing whole thing.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/