I have three form with few TextField
in my View
(GridLayout
), I need to designate each form with black line borders. How Can I do that. Do I need include css? Thanks in advance!
Geir Thomas Jakobsen
Yes, you need to add a style to the GridLayout.
final GridLayout gridLayout = new GridLayout();
// Add stuff to it ...
gridLayout.addStyleName("your-css-tag");
In your theme css (in my workspace webapp/VAADIN/themes/mytheme/mytheme.scss):
.your-css-tag {
border-style: solid;
border-color: black;
border-width: 1px;
padding: 5px;
}
You may need a rebuild of your project, to incorporate the CSS. In Maven, that means executing the Lifecycle
tasks clean
and install
.
For more information, see the manual chapter on Themes.
来源:https://stackoverflow.com/questions/32967850/vaadin-grid-layout-borders