Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2320
Move Scrollbar via CSOM
posted

Is there any way to position or adjust the WebTree scrollbar via ClientSide Object Model ?? 

  • 2320
    posted

    That helped me fix my issue.

    In the WebTree's InitializeTree clientside event I just set the scrollbar left property to 0 like this

    function treeTPs_InitializeTree(treeId)
        {
            // this code will readjust the horizontal scrollbar
            // to fix the scroll bug
            igtree_getTreeById(treeId).Element.scrollLeft = 0;
        }

    For future reference, I had to put this code in our clientside script to fix a bug I was having with the WebTree.  When the first node in the tree's display text goes off the screen and the tree renders the horizontal and verticle scrollbars it automatically adjusts the horizontal scrollbar which ends up scrolling the node expansion indicators (+ or - ) off the screen.  I tried toggling different properties but couldn't get it to stop auto adjusting the scrollbar.  This code resets it back.  Thanks again. 

     

     

  • 10880
    posted

    Try the following:

    igtree_getTreeById("UltraWebTree1").Element.scrollTop+=20;

    This should scroll the tree by 20 pixels at a time.