View Full Version : TreePanel, DnD and vertical scrolling

22 Apr 2007, 8:19 AM
Hi All,

I have just started using ext and I am working on a demo based on the example in http://extjs.com/forum/showthread.php?t=2029 . I am happy with my layout and scrollbars but I have the following problem:

My DnD enabled tree is so long that it does not fit into the west region. Now that I want to drag my nodes from the very bottom of the tree to target folders at the top, the target folders are not visible and I cannot finish my DnD action.

I guess there must be some configuration option or some other way to make the tree "automagically" scroll so that my target folder becomes visible, while I am trying to drag my node over the top part of the tree. Could someone please suggest me some documentation, example or a name of a component I should consider in order to make the vertical scrolling to take place during DnD?

I have been trying to go through docs and forums, but my problem is that I do not know the proper key words related to my problem. Or perhaps I have been just Ext-ing too much to day so I cannot see the obvious... (:|

24 Apr 2007, 3:31 AM
now I think I eventually got it :D My TreePanel was inside a ContentPanel, which in turn was in the center region of my BorderLayout. ScrollManager wants to know if the element containing the tree isScrollable(). In my case it never was, because magically el.dom.scrollHeight and el.dom.clientHeight were always equal. The config option that I needed for my ContentPanel was fitToFrame:true

westBorderLayout.add('center',new Ext.ContentPanel('west-content',{containerScroll: true, fitToFrame:true, autoScroll:true}));

The post that put me on the right track was this one