首页 > 解决方案 > 如何增加 vaadin 进度条的大小(厚度)

问题描述

我如何能够增加 vaadin 进度条的高度(厚度)- 7.6.3。还有我如何显示正在进步的值。例如,在进度条的中间显示完成了多少以及剩余多少。我已尝试使用以下代码,但它始终是默认大小。

_progress.setWidth("100%");
_progress.setHeight("100%");

我也厌倦了使用 css 之类的东西,

_progress.setCaption(" ");
_progress.setCaptionAsHtml(true);
_progress.addstylename("progress");

我在 .css 中定义的“.progress”在哪里

.progress1 {
color: black;
text-align: right;
font-size: 2em;
font-weight: bold;
height: 100%;
}

标签: groovyprogress-barvaadinvaadin7

解决方案


您必须将包装器包含到您的样式规则中,而不是仅为您的进度条定义样式。

  .v-progressbar-fat .v-progressbar-wrapper {
    height: 20px;
  }

如果您将此添加到样式表并将样式名称“fat”应用于进度条,它的高度将更改为 20px(或您希望的任何数量)


推荐阅读