Autoscroll on parent panel, when there is overflow on child panels.Extjs

大兔子大兔子 提交于 2019-12-10 19:29:25

问题


I'm having a single Parent Panel, which has 2 child panels. One has content dynamically created, while the other is fixed height and width. The Parent panel is using border layout, with center and east regions defined. I'm trying to get autoscroll to trigger on the parent panel when there is an overflow on on the center region panel. I've set the autoscroll option to true to the parent panel, but everytime there is an overflow on the center panel, it just gets cuts off. When I'm adding an overflow to center region panel, i get a scrollbar for that panel alone. I don't need that, but rather I want it on the entire Parent Panel. Let me know if anyone has any suggestions..


回答1:


This issue is usually a result of over-nesting Panels, and/or one or more Panels in the layout not having a layout config specified. Some layout configuration code would help.




回答2:


Here is my view from what I understood.. You have two panels that go into the center region of the border layout.. and you need a scroll bar for the center when one of the panels overflow.

Here is how I worked out a similar situation. In my center region, I have a panel with autoScroll set to true. I have two panels added to this panel. The first is fixed height (its a grid) and second is panel (displayed below the grid) is a large form panel. Due to the parent panel having a autoScroll property set, you will have a scroll bar for the entire panel and not the second panel alone!

I don't think you can use fit layout. In fit layout, the panel will take up the whole area of its container and you will not be able to add another panel (the second panel will be hidden I suppose!).

Note: I am using the default layout (Container Layout) I do not specify any layout in my parent panel.



来源:https://stackoverflow.com/questions/4946498/autoscroll-on-parent-panel-when-there-is-overflow-on-child-panels-extjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!