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
160
WebTree inside a div
posted

Hi,

I'm facing two problems when I put a webtree inside a div element with overflow set to auto, so scrollbars should appear when the size of the webtreeis greater than the div.

First, when i'm expanding the tree to a level that the items do not fit anymore inside the div, the position of the horizontal scrollbar is automatically moved to the right. The result is that upper levels are not entirely visible anymore. How can I avoid the horizontal scrollbar from moving?

Second, when I'm selecting a node where the vertical scrollbar is not at the top the scrollbar is repositioned to a location where the selected node is at the bottom. How can I avoid the vertical scrollbar from moving?

I'm using version: 8.2.20082.1000.

thanks,
Jeroen

  • 160
    posted

    OK,

    I detected what the issue was for my first problem: the indentation property. When setting this to let's say 20 the actual rendered spans are moved  to the right with 20px steps, dependent on the level of a treenode. I'm now setting the indentation to zero and making my own indentation by adding nbsp's to the left of my node text. This works. The horizontal scrollbar is not moved to the right anymore.

    I'm still occupied with the second problem...

    thanks,
    Jeroen