dojodijit.tree

How to remove horizontal scrollbar in dojo tree?


Can someone please suggest me how can I remove the horizontal scroll-bar appearing at the bottom of the dojo tree structure ?

I learnt there is a .resize() function in dojo which can help but exactly I don't know how to implement this in my tree structure to remove the horizontal scroll-bar.Can someone suggest me.

Thanks and Regards


Solution

  • If your tree container has a fixed width, you could just use CSS to adjust it. Otherwise, you could manually resize your container like this,

    resize: function(d) {
        this.myContainer.resize(d);
    }
    

    If d is not of the proper size, you could use dojo getMarginBox(this.domNode) to get the size of your widget.