如何使用vaadin使VerticalLayout可滚动? [英] How can I make a VerticalLayout scrollable using vaadin?

查看:252
本文介绍了如何使用vaadin使VerticalLayout可滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个组件作为一个公共布局存在于我的所有页面。此组件的布局如下(使用油漆制作,请对不起:p):

I have a Components which exists as a common layout for all my pages. The layout of this component is as follows (made using paint so please sorry :p):

向右箭头表示此布局为Horizo​​ntalLayout,向下箭头为VerticalLayout。

Right arrows mean that this layout is a HorizontalLayout and down arrows VerticalLayout.

我真的有兴趣制作bodyContent布局滚动。在这个布局中,我通常引入大量的UI组件(更多的布局,文本字段,表单,网格...),有时组件没有显示,由于缺乏垂直空间和没有垂直滚动。所以有什么办法使bodyContent可滚动(使用SCSS / CSS或任何其他方式)?

I'm really interested in making bodyContent layout SCROLLABLE. Within this layout I usually introduce lots of UI components (more layouts, text fields, forms, grids...) and sometimes components aren't shown due to the lack of vertical space and the absence of vertical scroll. So is there any way to make bodyContent scrollable (using SCSS/CSS or any other way)?

提前感谢。

EDIT:
我已解决此问题,感谢 @ JaneVi

.v-ui > .v-widget {
   overflow: visible;
}


推荐答案

尝试使用 Panel ,您可以使用 setContent()在其中放置bodyContent(垂直布局),并且当布局的高度超过面板的高度。

Try using Panel within which you can put your bodyContent(vertical layout) using setContent() and can have scroll bars when height of your layout exceeds the panel's height.

这篇关于如何使用vaadin使VerticalLayout可滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆